p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   VB.NET 2002/2003 Basics (http://p2p.wrox.com/forumdisplay.php?f=76)
-   -   Inserting Images and retrieving from SQL SERVER (http://p2p.wrox.com/showthread.php?t=30805)

adamusufi June 24th, 2005 04:13 AM

Inserting Images and retrieving from SQL SERVER
The guros
I am using VB.net with Sql server to add images in to the table.
This is how I did it but could not work:

mycommand.commandtext = "INSERT INTO student_master" & _
                        " ( st_picture, st_signature)" & _
                        " values ( @picture1, @picture2)" & _
                        " where student_id = @stu_id"
mycommand.parameters.add( "@picture1", picturebox1.image)
mycommand.parameters.add( "@picture2", picturebox2.image)
mycommand.parameters.add( "@stud_id", txtstudent_id.text)

The data type is image and the student_master table contains other fields that data have already been added through another form. The 2 fields I want insert are empty and I used WHERE clause to the Records. I also used Update statement instead of Insert, but still did not work.

I also tried EXEC SP_tableoption student_master, 'txt In row', 'ON'
on the table and executed the above code again; but did not work

I also need some help to retrieve images from table on to the forms of Vb.net

Adamu sufi

All times are GMT -4. The time now is 11:29 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.