|
-
Mar 24th, 2002, 12:23 AM
#1
Thread Starter
Addicted Member
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
VB6, VB.NET, C#, SQL, XML, ADO.NET, ASP.NET, HTML.
MCP & A+ Certified. Looking for a job in the Seattle, WA area.
-
Mar 24th, 2002, 12:28 AM
#2
Thread Starter
Addicted Member
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
VB6, VB.NET, C#, SQL, XML, ADO.NET, ASP.NET, HTML.
MCP & A+ Certified. Looking for a job in the Seattle, WA area.
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
|
Click Here to Expand Forum to Full Width
|