G
Guest
I remember that there are functions to do it, but I forgot their names.
Anyone can give me a help?
Thank you.
David
Anyone can give me a help?
Thank you.
David
sloan said:IDataReader has a .GetBytes method.
Something like this:
object o = dataReader.GetValue (123);
Console.WriteLine ("");
byte[] byteCodes = new byte[8];
long len = dataReader.GetBytes(123, 0, byteCodes, 0, 8);
Console.Write("Byte codes: ");
for (int i = 0; i < len; i++)
{
Console.Write(byteCodes.ToString("x"));
}
}
That was getting a timestamp value (8 length). You'll need to rework it, if
the length is unknown.
123 represents the ordinal position of the select statement.
Select lastname, firstname from Emp
lastname ordinal is 0
firstname ordinal is 1
I used 123 so it would stand out.
david said:I remember that there are functions to do it, but I forgot their names.
Anyone can give me a help?
Thank you.
David
Steve C. Orr said:Yes, here's an example that allows upload and download of files and binary
storage of them in SQL Server.
http://SteveOrr.net/articles/EasyUploads.aspx
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.