-
May 13th, 2008, 08:27 PM
#1
Thread Starter
Hyperactive Member
inserting byte array to a blob field-RESOLVED
This is a simple version of what I am trying to do, yet my query is underlined with the following:
Operator '&' is not defined for types 'String' and 'one-dimentional array of byte'
Code:
"insert into Sculptures (SCULPTURE_IMAGE) values(" & Me.ImageData & ");"
Anyone tell me another way to accommplish this? This is a ACCESS Database
Last edited by gtilles; May 15th, 2008 at 12:22 PM.
Truly, you have a dizzying intellect.
-
May 14th, 2008, 08:52 AM
#2
Re: inserting byte array to a blob field
The problem is that you're trying to concatenate the byte array into a string before putting it into the database. Since byte arrays and strings are different things, it won't let you do this.
I'd suggest putting the ImageData into a parameter of type BLOB and adding that parameter to a command object and inserting it that way.
(VB/C#) is clearly superior to (C#/VB) because it (has/doesn't have) <insert trivial difference here>.
-
May 14th, 2008, 09:14 AM
#3
Re: inserting byte array to a blob field
(VB/C#) is clearly superior to (C#/VB) because it (has/doesn't have) <insert trivial difference here>.
-
May 15th, 2008, 12:27 PM
#4
Thread Starter
Hyperactive Member
Re: inserting byte array to a blob field-RESOLVED
Thanks,
As you suggested I ended up using Queries like a Stored Procedure to get the image in to the DB.
I am familiar with sequel server sprocs to insert images but never Access.
I previously did years ago a classic ASP where I inserted the image with inline sql to the db after an insert using update. I'm glad my classic asp days are mostly over...
Truly, you have a dizzying intellect.
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
|