[V4RB] VCursor.Field(x).RecID gone?

Peter De Berdt peter.de.berdt at pandora.be
Fri May 16 17:30:55 CDT 2003


>on 5/16/03 3:12 PM, Peter De Berdt at peter.de.berdt at pandora.be wrote:
>
>>  I just installed the newest beta of the V4RB plug-in resolving the
>>  database creation issue on Win32.
>>
>>  My application that compiled fine in the past now gives me an error
>>  on mCursor.Field(1).RecID, which I have used successfully in the
>>  past.
>
>Hmm, in any case this is not correct syntax
>Should be
>
>         mCursor.ULongField( "RecID" )
>
>Or you have try access RecID property of field?
>Yes it seems I have remove this, because this was wrong idea.
>Because if TMP table is created, this RecID will point to TMP table.
>
>>  I know I can get the record id by including it in the query (be
>>  it explicitly or by using **) but the problem is my cursor is as
>>  follows:
>>
>>  mdatabase.SQLSelect("SELECT DISTINCT Export_ID FROM MyTable WHERE
>>  MyRelation_Ptr="+str(mdatabase.mytable.GetRecID)+" ORDER BY
>>  Export_ID")
>>
>>  If I include record ID in the query, my whole table is returned
>>  instead of the unique Export_IDs, which gives me trouble when using
>>  these values in a query to a 4D Database two lines further down my
>>  code.
>
>Peter, but if you do DISTINCT, then NO SENSE to get RecID !!!
>
>Look, let 10 records have the same Export_ID
>Valentina select only one of them into result.
>So what RecID you of these 10 records you think you get???
>
>Ambiguity.
>This is why you MUST NOT and CANNOT access it.

I was mistaken, the cursor I was having trouble with had indeed a * 
instead of a DISTINCT value in it. Just far too much code and a very 
stressing week, I think there's a short-circuit (or two) in my brain 
;)
-- 

Best regards,

Peter De Berdt
--------------
My software never has bugs, it just generates random features...


More information about the Valentina mailing list