Good afternoon,
Ok, I have a form that adds a record to my database. This record contains an image that gets entered as Binary Data. The code for this is:
Obviously shortened to keep this post down. However, what I cannot work out is how to update the recordset. I have tried a number of attempts, i.e. changing rs.add to rs.edit but I receive:
I also tried changing the rs.Open to include 'where ID=1' to try and edit the first recordset. But this still just adds a new record.
If anyone has any ideas they would be greatly apprechiated.
Kind regards
Sam
Ok, I have a form that adds a record to my database. This record contains an image that gets entered as Binary Data. The code for this is:
Code:
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open "tbl_news", connStr, 2, 2
' Adding data
rs.AddNew
rs("File Name") = fileName
rs("File Size") = fileSize
rs("File Data").AppendChunk fileData
rs("Content Type") = contentType
rs("name") = nameInput
rs("details") = detailsInput
rs("date") = dateInput
rs.Update
rs.Close
Set rs = Nothing
Obviously shortened to keep this post down. However, what I cannot work out is how to update the recordset. I have tried a number of attempts, i.e. changing rs.add to rs.edit but I receive:
Code:
Object doesn't support this property or method: 'edit'
I also tried changing the rs.Open to include 'where ID=1' to try and edit the first recordset. But this still just adds a new record.
If anyone has any ideas they would be greatly apprechiated.
Kind regards
Sam