Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO Query
Message
From
26/11/2002 05:26:00
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00726849
Message ID:
00726861
Views:
13
Vlad

Oops, I thought I'd changed that line to "SELECT *".

Sorry to waste your time, thanks for spotting that.

Kev

>Hi!
>
>Just think logically: you hav a record only with ID. HOW your computer coudl determine which record to update on the server? You requrie to query 2 fields - ID and table name. When updating, now you will have more exact pointing to what record updates should go - to record with that TABLE and that ID.
>
>HTH.
>
>>Hi
>>
>>When I try the following code, it updates ALL records in the table with the same ID field value:
>>
>>
>>LPARAMETERS tcTable
>>LOCAL loRS, lnVal
>>tcTable = ALLTRIM(UPPER(tcTable))
>>
>>*Get recordset
>>loRS = this.GetRecordSet("SELECT Id FROM NextId WHERE Table = '" + tcTable + "'", 3)
>>
>>*Up ID
>>loRS.Fields("Id").Value = loRS.Fields("Id").Value +1
>>loRS.Update()
>>lnVal = loRS.Fields("Id").Value
>>loRS.Close()
>>
>>*Return next id
>>RETURN lnVal
>>
>>
>>The GetRecordSet() Method also sets up the LockType property with the 2nd parameter (3).
>>
>>Any ideas on what I'm doing wrong here?
>>
>>Thanks
>>Kev
Previous
Reply
Map
View

Click here to load this message in the networking platform