ADO, timestamp column in SQLServer 
Author Message
 ADO, timestamp column in SQLServer

I am considering using a SQLServer timestamp column to guard against
concurrent updates.

I would save the value of this column in the VB program when I
retrieve a record, and then compare it when I make my update.

But I can't seem to retrieve the value correctly using ADO.  I try to
put
adoRS.Fields(i).value into a string or a variant, but it's not going
to match what is in the table.

Out of curiosity, I tried the form wizard, but the results can't
handle a table with this column.

Has anybody done this sort of thing successfully?



Sat, 07 May 2005 04:15:20 GMT  
 ADO, timestamp column in SQLServer
How do you perform your updates?  If you use the Command object,  ADO
handles any data type conversions that are necessary.

All my data access is through stored procedures via ADO command objects.  I
move the recordset timestamp value into a Variant (recordset -> class
module) and when it comes time to update I simply move the Variant into the
parameter value of the command. Works great.


Quote:
> I am considering using a SQLServer timestamp column to guard against
> concurrent updates.

> I would save the value of this column in the VB program when I
> retrieve a record, and then compare it when I make my update.

> But I can't seem to retrieve the value correctly using ADO.  I try to
> put
> adoRS.Fields(i).value into a string or a variant, but it's not going
> to match what is in the table.

> Out of curiosity, I tried the form wizard, but the results can't
> handle a table with this column.

> Has anybody done this sort of thing successfully?



Sat, 07 May 2005 08:48:01 GMT  
 ADO, timestamp column in SQLServer
Jim

Do you get totally different value?

--
Val Mazur
Microsoft MVP


Quote:
> I am considering using a SQLServer timestamp column to guard against
> concurrent updates.

> I would save the value of this column in the VB program when I
> retrieve a record, and then compare it when I make my update.

> But I can't seem to retrieve the value correctly using ADO.  I try to
> put
> adoRS.Fields(i).value into a string or a variant, but it's not going
> to match what is in the table.

> Out of curiosity, I tried the form wizard, but the results can't
> handle a table with this column.

> Has anybody done this sort of thing successfully?



Sat, 07 May 2005 21:26:53 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. SQLServer & VB 32bit TimeStamp Conversion Problem

2. SQLServer & VB 32bit TimeStamp Conversion Problem

3. VB, SQL Server, RDO, ODBC and Timestamp column manipulation

4. Comparing against a TimeStamp column using TSEqual() function.

5. VB, RDO - ODBC, SQL Server and Timestamp column manipulation

6. timestamp column identification

7. VB4/16 and SQLServer Image columns/Access

8. Create adTinyInt column with ADOX in SQLServer causes error

9. pb with indentity column in SQLServer

10. Create adTinyInt column with ADOX in SQLServer causes error

11. Using timestamps with VB6, ADO and MSSQL 6.5

12. ADO and Timestamp on SQL6.5

 

 
Powered by phpBB® Forum Software