View Single Post
Join Date: Aug 2008
Posts: 710
Reputation: Teme64 will become famous soon enough Teme64 will become famous soon enough 
Solved Threads: 114
Teme64's Avatar
Teme64 Teme64 is offline Offline
Master Poster

Re: upload image in vb.net

 
0
  #6
Dec 4th, 2008
That works. If you have an existing row to update. If you want to insert a new one, the code changes a bit:
  1. 16. Dim command As New SqlCommand("INSERT INTO MyTable (Picture) VALUES (@Picture); SELECT @@IDENTITY AS 'Identity'", connection)
  2. 17. Dim ThisPictureID As Integer
  3. 26. ThisPictureID = CInt(command.ExecuteScalar())
Now ThisPictureID contains new ID.
Reply With Quote