View Full Version : HTML5 Camera actionscript


05-02-2013, 02:11 PM
I realize it may be a feature that hasn't been made available yet but just in case I thought I'd check in with you all about it. I am trying to test out the camera feature but am having trouble creating a blob type control which of course then forces me to upload an image to a folder instead of being able to store the image directly inside of my table. When I create a control there isn’t a Blob type and I am not sure if that's the problem. I have the image control bound to my image field in the table and it is an "Image" field type. Back end is MS SQL 2008. Anyone else tested this feature our who might know what I am missing?


Steve Workings
05-02-2013, 02:43 PM
Store the image in a varbinary(max) field in MS SQL.

We've been experimenting with this since the day after it came out, I'm building a major integration of this to OERCA right now. It's easy to build, fast and simple to use.

05-03-2013, 07:16 PM
My field type is varbinary(max) as suggested. When I try to commit the record to the database alpha tells me that the "implicit conversion from data type nvarchar to varbinary(max) is not allowed.

Is there something I need to do with the control to make it work?

05-03-2013, 07:21 PM
When I create the control it is a character based control. I don't see an option for blob.

Steve Workings
05-04-2013, 12:22 AM
Josh - I don't understand what you don't understand, and I'm not sure why you're so focused on a blob.

If you're using MS SQL, use the field type I've already recommended. In the UX component, your control is an Image control. It is that simple.

05-04-2013, 12:32 AM

That is exactly how I have it configured. Image (Data bound) control. I am using a button to upload the image, when I try to submit the data I receive the error I displayed above.

As I mentioned above the error I receive is below.
"implicit conversion from data type nvarchar to varbinary(max) is not allowed"

It makes a suggestion to use a convert function in my SQL statement but I don't have direct access to the SQL when using the data binding in a ux component.

05-04-2013, 12:57 AM
Full error message:

Error executing SQL Insert
INSERT INTO dbo.test_image_upload (text, image) VALUES (:test_image_upload_text, :test_image_upload_image)

:test_image_upload_text (C) test
:test_image_upload_image (C)

Database API specific error

Your database has returned the following error code and description to Alpha Five.
Consult your database documentation for further information.

257 - '[Microsoft][SQL Server Native Client 10.0][SQL Server]Implicit conversion from data type nvarchar to varbinary(max) is not allowed. Use the CONVERT function to run this query.
SQL State is: 42000'

05-04-2013, 01:47 AM
It looks like it has something to do with the fact that I am trying to use this feature in a repeating section. It's a warranty request form and the user may have multiple items to submit as a single request and I wanted to be able to allow them to attach an image for each item. Looks like thats the problem.

05-04-2013, 11:50 AM
I think the data gets passed in as string data in a repeating section. Maybe this is not a supported feature

Bill Griffin
05-07-2013, 08:32 AM
Looks like this was added to the current release

UX Component - Image Upload - Camera - Repeating Sections - Support has been added for image upload from a camera into image fields in a Repeating Section.

05-08-2013, 02:00 AM

Yes, Selwyn fixed the issue and I've tested it since and all is well.