|
-
Jun 24th, 2005, 08:04 AM
#1
Thread Starter
PowerPoster
C# and SQL types
Hi there, this is a similar Q as my other thread but not the same...
What I am wondering is, in SQL we can stores binary. And in C# we have to make byte[] object and then send that value stored in the byte[] paramater to SQL and its stored.
but when RETRIEVING from SQL using dataReader, and that value to retrieve is of SQL binary.... what type should I use in order to retrieve the value?
i.e:
Code:
object theDataReadFromSQL;
while(dataReader.Read())
{
theDataReadFromSQL = dataReader.GetValue(0);
}
thats fine but the thing is, I cannot compare the bytes with the bytes of something else, as the bytes stored in theDataReadFromSQL is of type object.
its hard to explain... but i hope you understand...?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|