PC Review


Reply
Thread Tools Rate Thread

C# timestamp datatype?

 
 
Soulless
Guest
Posts: n/a
 
      22nd Nov 2007
Hi,

I am accessing a stored proc from within C# and the result of the proc
populate a dataset.

The problem is, the proc returns an int and a timestamp. I do not
need the timestamp and wish it was not there, but it is and my code
fails because I am not sure what I can send the timestamp to in
C# .... right now I have a column in my dataset defined as string, but
it doesn't not work.

Is there a datatype in C# I can use that will allow the return of a
timestamp, or another suggestion on how I can get around this?

Thanks!
 
Reply With Quote
 
 
 
 
Marc Gravell
Guest
Posts: n/a
 
      22nd Nov 2007
byte[] - i.e. an array of bytes. For info "timestamp" is the same as
varbinary(8), except for the automatic update behavior

Marc
 
Reply With Quote
 
Marc Gravell
Guest
Posts: n/a
 
      22nd Nov 2007
(and if you find that ugly, just run it through
Convert.ToBase64String / FromBase64String at your data-layer and work
with a string in your code)
 
Reply With Quote
 
Marc Gravell
Guest
Posts: n/a
 
      22nd Nov 2007
One other thought if you get this type of problem again... simply
declare it as "object", then set a break-point and find what the
system decided to use (and change you code to use that)... it isn't
elegant (and it isn't fool-proof), but it will usually work.

Marc
 
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
How do you view a "TimeStamp(6)" Oracle datatype using ACCESS? =?Utf-8?B?Tm9tYXJEQkE=?= Microsoft Access 0 24th May 2006 10:57 PM
How do you view a "TimeStamp(6)" Oracle datatype using ACCESS? =?Utf-8?B?Tm9tYXJEQkE=?= Microsoft Access 0 24th May 2006 10:57 PM
VS2005, C#, DataBinding of SqlServer 2K TimeStamp datatype ESmith Microsoft ADO .NET 2 4th Feb 2006 08:15 PM
Timestamp Datatype issues IntraRELY Microsoft ADO .NET 6 16th Dec 2003 06:25 PM
Error when trying to get Oracle timestamp datatype richard green Microsoft ADO .NET 2 1st Dec 2003 10:29 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:33 PM.