PC Review


Reply
 
 
Ram
Guest
Posts: n/a
 
      11th Dec 2003
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.
 
Reply With Quote
 
 
 
 
One Handed Man [ OHM# ]
Guest
Posts: n/a
 
      11th Dec 2003
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#


Ram wrote:
> 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 Removed)


 
Reply With Quote
 
Bill McCarthy
Guest
Posts: n/a
 
      11th Dec 2003
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.



"(E-Mail Removed)" <(E-Mail Removed)> wrote in message
news:09ef01c3bfe0$cadc2370$(E-Mail Removed)...
> Yes the format has changed while reading from the reader
> itself.
> >-----Original Message-----
> >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#
> >
> >
> >Ram wrote:
> >> 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 Removed)
> >
> >
> >.
> >



 
Reply With Quote
 
ram
Guest
Posts: n/a
 
      12th Dec 2003
It is a problem with Data reader and they are working on
for workaround. Thanks for yr reply.

>-----Original Message-----
>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.
>
>
>
>"(E-Mail Removed)" <(E-Mail Removed)>

wrote in message
>news:09ef01c3bfe0$cadc2370$(E-Mail Removed)...
>> Yes the format has changed while reading from the

reader
>> itself.
>> >-----Original Message-----
>> >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#
>> >
>> >
>> >Ram wrote:
>> >> 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 Removed)
>> >
>> >
>> >.
>> >

>
>
>.
>

 
Reply With Quote
 
One Handed Man [ OHM# ]
Guest
Posts: n/a
 
      12th Dec 2003
When you have some news on this, could you post it back to the NG.

Thanks - OHM#

ram wrote:
> It is a problem with Data reader and they are working on
> for workaround. Thanks for yr reply.
>
>> -----Original Message-----
>> 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.
>>
>>
>>
>> "(E-Mail Removed)" <(E-Mail Removed)> wrote in
>> message news:09ef01c3bfe0$cadc2370$(E-Mail Removed)...
>>> Yes the format has changed while reading from the reader
>>> itself.
>>>> -----Original Message-----
>>>> 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#
>>>>
>>>>
>>>> Ram wrote:
>>>>> 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 Removed)
>>>>
>>>>
>>>> .
>>>>

>>
>>
>> .


Regards - OHM# (E-Mail Removed)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
data access layer and data reader =?Utf-8?B?cm9kY2hhcg==?= Microsoft C# .NET 3 24th Apr 2007 10:24 PM
how to collectly put data in each cell from magnetic card reader data Electron-Serve Depot Microsoft Excel Worksheet Functions 4 6th Nov 2006 05:21 AM
Converting an Oracle Data Reader into a SQL Server Data Reader Microsoft ADO .NET 3 20th Dec 2003 05:21 PM
problem with assigning data from data reader to label control in web form mhnazly Microsoft ASP .NET 1 28th Oct 2003 12:19 AM
formatting datetime data from a data reader field Lauchlan M Microsoft C# .NET 1 9th Sep 2003 08:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:19 AM.