Insert BLOB Field with ADO
Visual Basic
1
Posts
1
Posters
0
Views
1
Watching
-
I am trying to put the binary file to Blob field in the oracle but when updating i have error saying [Oracle][ODBC]Function error what is the problem? I am using madac 2.6/VB6 Set rs = New ADODB.Recordset rs.Open "Select * from LOB_TABLE", cn, adOpenKeyset, adLockOptimistic ' Create the ADO Stream object Set mStream = New ADODB.Stream ' Make it a binary type mStream.Type = adTypeBinary ' Open the stream mStream.Open ' Read the binary file into the stream buffer mStream.LoadFromFile BlobSourcePath & BlobFileName ' Add the blob to the database With rs .AddNew '.Fields("BLOBFIELD").Value = mStream.Read rs!Field = BlobFileName rs!BLOBFIELD = mStream.Read '.Fields("FIELD").Value = BlobFileName .Update <<<<<