C# timestamp datatype?

  • Thread starter Thread starter Soulless
  • Start date Start date
S

Soulless

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!
 
byte[] - i.e. an array of bytes. For info "timestamp" is the same as
varbinary(8), except for the automatic update behavior

Marc
 
(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)
 
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
 
Back
Top