General discussion

Locked

VB + SQL Timestamp + Sheridan SSDBGRID

By estebandelatorre ·
Scenario.
1.- An MS-SQL 7.0 Table with: Name, Address and a Timestamp
2.- Using ADO, retrieve some rows with some king of select statement... into a recordset
If I move the recordset into the Sheridan SSDBGRID control, the column of the timestamp value turns on "blank"!. This is a limitation of the Sheridan Datagrid Object (SSDBGRID.ocx) It can't hold Binary data.
Question: Need a Function (VB or SQL) that allows to convert the readed Timestamp data into TEXT or DATE (something to be able to insert into the SSDBGRID), and then BACK to it's originally Timestamp Value (in order to check if that record has been changed or not)
IF I use a Variant variable to hold the timestamp value (insted of using the grid SSDBGRID) the code works fine.
(I need the grid! not an array bounded to the datagrid !!!)
Thanks

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Tony Hopkinson In reply to VB + SQL Timestamp + Sher ...

No it's a limitation of timestamp. All it is an 8 byte value guaranteed to be unique in the database. Displaying it is useless. If you were fooled by the name into thinking it was the datetime the row was added, then your going to have to restructure the table.
PS you could go through a process of converting it, but the timestamp value will change on an update of the record, so only lasts until the next change. Which is why should also never use it as a primary key.

Collapse -

by estebandelatorre In reply to

Hi Tony, I understand what a timestamp is an d what is for. If I store "name" and "address" into the ssdbgrid and the timestamp value into a variant vb variable, if the record has been changed the sp that attemps to update the record will fail with a raiseerror. What I want to do is to hold "some equivalent (unique text or date)" in a 3er colunm of the grid, and when a row grid is selected, convert it's value back to the originaly timestamp value in order to check if it is able to update or not. Thanks anyway

Collapse -

Plz send me Sheridan ActiveX files

by linhdv In reply to

That are:
- SSDBGRID.ocx
- SSTab.ocx

and send to: linhdv@yahoo.com

Thanks

Collapse -

by Tony Hopkinson In reply to VB + SQL Timestamp + Sher ...

Hazy on SQL 7.0 now. Did it have the GUID datatype in it. Using convert might get you somewhere if so. Not familiar enough with VB and no longer have access to it to check. In other langauges if I had to do this I'd covert it to hex and display as a 16 byte string. Personally I'd being going sideways on this, which would goodbye timestamp or goodbye sheridan grid. I don't like designing corners I can't get out of.

Collapse -

SSDBGRID.OCX

by danimels In reply to VB + SQL Timestamp + Sher ...

Good Morning,

My name is Daniel from Brazil. I erase my ocx file SSDBGRID.ocx . You can send the file to my e-mail? danimels@bol.com.br
(I'm sorry, my english is terrible)

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums