Set rs2 = New ADODB.Recordset
rs2.Open "select * from company_name", db, adOpenKeyset, adLockBatchOptimistic
rs2.AddNew
If pdfpath <> "" Then
Set pdffile = New ADODB.Stream
pdffile.Type = adTypeBinary
pdffile.Open
pdffile.LoadFromFile pdfpath
rs2.Fields("pdf") = pdffile.Read
rs2!co_no = Val(co_no.Text)
rs2!co_name = co_name.Text
'''
pdffile.Close
Set pdffile = Nothing
rs2.Update
Set rs2 = Nothing
MsgBox "Saved"
End If
my error is Multiple - step OLEDB generated errors, check each oledb status value , if available no work was done
any help plzzz
SaRa Ahmad
0
Junior Poster in Training
Recommended Answers
Jump to PostThat can be caused by a bad connection string. What is your connection string and what kind of database are you connecting to? What line is throwing the error?
Jump to PostIt appears you are trying to change data in the record set with out and edit method
In the line before the error addrs2.Edit
Jump to PostWhy not just run an UPDATE query against the table? Why bother updating the recordset? What exactly are you trying to do?
All 12 Replies
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
SaRa Ahmad
0
Junior Poster in Training
Klahr_R
0
Newbie Poster
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
SaRa Ahmad
0
Junior Poster in Training
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
SaRa Ahmad
0
Junior Poster in Training
Reverend Jim
4,678
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
SaRa Ahmad
0
Junior Poster in Training
SaRa Ahmad
0
Junior Poster in Training
Goutami_1
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.