January 15, 2009 at 12:34 am
hi,
Please let me know that how to create table with "Image field" and inserting pictures into that table?
Thanks,
January 15, 2009 at 4:15 am
Hi Ravikumar,
You can directly use Image as Data Type for that column & for inserting data to it, u can use the following working code.
SQLQuery = Insert into tablename(FileData) values (@File)
command = new SqlCommand();
command.CommandText = SQLQuery;
command.Parameters.AddWithValue("@File", file);
here file will be your byte array containing binary data.
Regards,
Ulhas
Regards,
Ulhas
January 15, 2009 at 8:11 am
First you need to define your table with a column of varbinary(max). Then you can use the code provided by ulhas.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
January 16, 2009 at 10:40 pm
ravikumar.niit8729 (1/15/2009)
hi,Please let me know that how to create table with "Image field" and inserting pictures into that table?
Thanks,
if u want how to generate image from image field by sql code then tell me...
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply