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.comICQ #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.