Using SQL Binary field

Hi all

i want to read a file through iostream into buffer & put the file in to database

the table is like below

name varchar(50)
data varbinary(MAX)

how i can use c++ to insert binary data(file) into table.& also read it back.

can any one provide me some link/tutorial , i tried google but i get c# code rather than c++.

i am using microsoft VC++ 2010 & MSSQL 2008 on windows 7

thanks in advance
Topic archived. No new replies allowed.