Data reader

  • Thread starter Thread starter Ram
  • Start date Start date
R

Ram

I am using ADO.Net data reader to retrieve data from main
frame. I am getting timestamp which is 26 (yyyy-mm-dd hh-
mm-ss.123456) bytes as sqltimestamp data type. I am using
data reader to retrieve this values and when i get it
from data reader it is coverting as (yyyy-mm-dd hh-mm-ss
AM or PM) and drops milliseconds.

If any one of you come across this problem pls let me
know how u have handled this situation.

Thanks in advance.
 
If you debug the read loop, can you see that the format has changed, or is
it when you assign the object to a dataTable or something ?

Regards - OHM#

I am using ADO.Net data reader to retrieve data from main
frame. I am getting timestamp which is 26 (yyyy-mm-dd hh-
mm-ss.123456) bytes as sqltimestamp data type. I am using
data reader to retrieve this values and when i get it
from data reader it is coverting as (yyyy-mm-dd hh-mm-ss
AM or PM) and drops milliseconds.

If any one of you come across this problem pls let me
know how u have handled this situation.

Thanks in advance.

Regards - OHM# (e-mail address removed)
 
I think your problem is that a timestamp in SQL is in fact NOT a date time
format. It is in fact just an eight byte value that changes when a row is
written to. (see SQL Books Online help for further information)
In .NET, you can deal with these values using a 64 bit integer type, either
Int64 or Unit64. Alternatively you can use a byte array. You may find it
easiest to use SqlBinary type.
 
It is a problem with Data reader and they are working on
for workaround. Thanks for yr reply.
 
When you have some news on this, could you post it back to the NG.

Thanks - OHM#
It is a problem with Data reader and they are working on
for workaround. Thanks for yr reply.

Regards - OHM# (e-mail address removed)
 
Back
Top