Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO Query
Message
From
26/11/2002 04:41:56
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
ADO Query
Miscellaneous
Thread ID:
00726849
Message ID:
00726849
Views:
33
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
Next
Reply
Map
View

Click here to load this message in the networking platform