|
-
Mar 11th, 2011, 04:07 PM
#1
Thread Starter
PowerPoster
[RESOLVED] Storing BLOB in SQLCE DB from VB6
I have a large binary object i need to store in a sql compact database.
Ive done this using an Access database before and I simply put the file into a byte array and chunked it into the db:
rst.Open strtemp, cnn, adOpenStatic, adLockOptimistic
rst!UserVBA.AppendChunk bytData
rst!Update
However, SQL Compact wont let me use adLockOptimistic (I am using ADO), so I am unable to update the database like this.
I can update simple fields in the database by using SQL Update queries with an ado command object:
Dim cm As New ADODB.Command
cm.CommandText = "UPDATE datTable SET fldField = 'someValue' WHERE anotherField = 'anothervalue'"
cm.CommandType = adCmdText
cm.ActiveConnection = rst.ActiveConnection
cm.Execute
This is an easy enough technique for a simple text field, but how can I get my byte array into a binary field in this database?
Any help greatly appreciated.
Last edited by Muddy; Mar 17th, 2011 at 08:53 AM.
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
|