SQL 2005

  • 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

  • First you need to define your table with a column of varbinary(max). Then you can use the code provided by ulhas.

  • 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...

    _____________________________________________________________________________________________________________
    Paresh Prajapati
    ➡ +919924626601
    http://paresh-sqldba.blogspot.com/[/url]
    LinkedIn | Tweet Me | FaceBook | Brijj

Viewing 3 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply