[V4Rb] VDatabase.LastInsertedRecID

Ivan Smahin IvanSmahin at public.kherson.ua
Sun Oct 16 00:08:50 CDT 2005


Hello Charles,

Saturday, October 15, 2005, 11:55:45 PM, you wrote:


CY> On Oct 15, 2005, at 4:49 PM, Ivan Smahin wrote:

>> Hello Charles,
>>
>> Saturday, October 15, 2005, 11:38:46 PM, you wrote:
>>
>> CY> Shouldn't VDatabase.LastInsertedRecID properly be
>> CY> VTable.LastInsertedRecID?
>>
>> No. It's database property.
>> It  means "last inserted RecID in any table of the current database by
>> current user".

CY> Since a recID is a property of a record in a table, it seems to me that
CY> it should be a VTable property.  Why is it a VDatabase property?

Do you really need the last inserted recID for each table?

You may use something like this:
SQLExecute( "insert into t1 ..." )
SQLExecute(    "    insert    into   t2   (ptr_to_t1_Field)   values(   "   +
VDatabase.LastInsertedRecID + ")" )

-- 
Best regards,
 Ivan                            mailto:IvanSmahin at public.kherson.ua



More information about the Valentina mailing list