0

Hi All,
I'm using ADO (VB 6.0) to try and insert and update an image to a mysql database. However i'm having problems doing this coz sometimes it updates only once and with every subsequent effort to update this column i get the following error : Run-time error '-2147467259(80004005)';
Data provider or other service returned an E_FAIL status
Or it just doesn't update and keep's on giving me the above error;


And the following is my code:
Dim con as new adodb.connection
Dim rs as new adodb.recordset
dim mytream as new adodb.stream
rs.open "select * from tbl_picture where id=1", con, adOpenKeyset, adLockOptimistic
mystream.open
mystream.loadfromfile "c:\image.jpeg"
rs!my_picture=mystream.read
rs.update
mystream.close
rs.close


N/B: I'm using mysql ODBC driver is version 3.51

Any Help towards solving this is highly appreciated.

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by techniner
0

What version of MDAC are you using?

Also Google for:

adExecuteNoRecords

This should suppress the error and allow the update to continue but you should really find out the root cause.

Chances are you are using old data connector.

IE MDAC 2.6 with .NET 2.0 etc.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.