-
Save MS Access BMP to SQL Server 2000
Hello,
I'm trying to store an MS Access Bitmap image to an SQL Server 2000 table via ADP. The field in SQL Server 2000 is image.
The code I'm using is:
Private Sub Command4_Click()
Dim rs As ADODB.Recordset
Set rs = New ADODB.Recordset
Dim formQuery As String
formQuery = "SELECT * FROM tblImageData"
rs.Open formQuery, CurrentProject.Connection, , adLockOptimistic
With rs
.AddNew
.Fields("ImageDescription") = Me.Text5
.Fields("ImageData").AppendChunk Me.Image3.PictureData
.Update
.Close
End With
End Sub
This results in a Run-time error '-2147217887(80040e21)'
Thanks for the help and sorry for originally posting this in the Access forum.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|