-
Writing images to DB??
I'm having a problem writing my JPEG image to my SQL Server 2000 database. Here's my code. I get the following error: "Unable To Bind To Field or Data member 'Cover'" What am I doing wrong?
Open .FileName For Binary As #1
ReDim bytData(FileLen(.FileName))
End With
Get #1, , bytData
Close #1
With RS
.AddNew
.Fields("Cover").AppendChunk bytData
.Update
End With
-
Actually, I just found out that the above error is actually occuring here after an addition to the database:
If Not (RS.BOF And RS.EOF) Then
txtTrack.Text = RS.Fields("track")
txtArtist.Text = RS.Fields("artist")
Set Image1.DataSource = RS 'setting image1's datasource
Image1.DataField = "Cover" 'set its datafield.
End If