Alpha Video Training
Results 1 to 11 of 11

Thread: HTML5 Camera actionscript

  1. #1
    Member
    Real Name
    Josh Cole
    Join Date
    Jun 2012
    Posts
    678

    Default HTML5 Camera actionscript

    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?

    Thanks!

  2. #2
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,606

    Default Re: HTML5 Camera actionscript

    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.
    -Steve


  3. #3
    Member
    Real Name
    Josh Cole
    Join Date
    Jun 2012
    Posts
    678

    Default Re: HTML5 Camera actionscript

    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?

  4. #4
    Member
    Real Name
    Josh Cole
    Join Date
    Jun 2012
    Posts
    678

    Default Re: HTML5 Camera actionscript

    When I create the control it is a character based control. I don't see an option for blob.

  5. #5
    Volunteer Moderator Steve Workings's Avatar
    Real Name
    Steve Workings
    Join Date
    Apr 2000
    Location
    The Dreaded Chair
    Posts
    5,606

    Default Re: HTML5 Camera actionscript

    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.
    -Steve


  6. #6
    Member
    Real Name
    Josh Cole
    Join Date
    Jun 2012
    Posts
    678

    Default Re: HTML5 Camera actionscript

    Steve,

    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.

  7. #7
    Member
    Real Name
    Josh Cole
    Join Date
    Jun 2012
    Posts
    678

    Default Re: HTML5 Camera actionscript

    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'

  8. #8
    Member
    Real Name
    Josh Cole
    Join Date
    Jun 2012
    Posts
    678

    Default Re: HTML5 Camera actionscript

    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.

  9. #9
    Member
    Real Name
    Josh Cole
    Join Date
    Jun 2012
    Posts
    678

    Default Re: HTML5 Camera actionscript

    I think the data gets passed in as string data in a repeating section. Maybe this is not a supported feature

  10. #10
    "Certified" Alphaholic
    Real Name
    Bill Griffin
    Join Date
    Jul 2001
    Location
    Edgewood, NY
    Posts
    1,201

    Default Re: HTML5 Camera actionscript

    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.
    Bill Griffin
    Parkell, Inc

  11. #11
    Member
    Real Name
    Josh Cole
    Join Date
    Jun 2012
    Posts
    678

    Default Re: HTML5 Camera actionscript

    Bill,

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

Similar Threads

  1. Capture Pictures from a Camera
    By nxlcomputers in forum Alpha Five Version 11 - Desktop Applications
    Replies: 15
    Last Post: 02-01-2014, 09:31 AM
  2. ActionScript on a submit button?
    By paul_sc1 in forum Application Server Version 8
    Replies: 2
    Last Post: 02-19-2008, 05:21 PM
  3. Question About Camera!
    By Rafael Harari in forum Alpha Five Version 6
    Replies: 2
    Last Post: 12-29-2004, 03:13 AM
  4. IP CAMERA
    By ken tjia in forum Alpha Five Version 5
    Replies: 4
    Last Post: 12-15-2003, 02:04 PM
  5. Need help with actionscript+calc field
    By mronck in forum Alpha Five Version 5
    Replies: 1
    Last Post: 09-10-2003, 04:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •