469,643 Members | 2,036 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

C# timestamp datatype?

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

Marc
Nov 22 '07 #2
(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)
Nov 22 '07 #3
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
Nov 22 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dean Slindee | last post: by
5 posts views Thread by Prabu Subroto | last post: by
1 post views Thread by Si | last post: by
1 post views Thread by db2_d_b_a | last post: by
4 posts views Thread by sandhu236 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.