Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO Query
Message
From
26/11/2002 05:11:13
 
 
To
26/11/2002 04:41:56
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Miscellaneous
Thread ID:
00726849
Message ID:
00726857
Views:
13
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
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform