Infopath Attachment Field; Submit in SQL Server - InfoPath Dev
in

InfoPath Dev

Infopath Attachment Field; Submit in SQL Server

Last post 07-17-2010 07:11 AM by Skarn. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-19-2010 03:23 AM

    Infopath Attachment Field; Submit in SQL Server

     Hi all,  

    Is there a way to get the attachment from the form to an SQL Server column using VBA? There are some examples about encodind and decoding attachments, though is this the case?

    Does SQL server support attachments somehow?

    Thanks in advance,
    Sun

  • 04-19-2010 10:31 AM In reply to

    Re: Infopath Attachment Field; Submit in SQL Server

     This thread might help:

    http://www.infopathdev.com/forums/p/15172/53778.aspx#53778

    Ernesto Machado
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™


  • 07-17-2010 07:11 AM In reply to

    • Skarn
    • Top 50 Contributor
      Male
    • Joined on 04-20-2008
    • Australia
    • Posts 198

    Re: Infopath Attachment Field; Submit in SQL Server

    I tried an approach where in jScript I made a manual connection to the SQL server and sent the attachment field text (it's BASE64 encoded already) to the database to a memo field. You can't bind an Infopath field to a memo field directly - and memo fields are what's needed if you have an attachment of any appreciable size.

    It worked - I got the attachment saved to the field - and had to write more code to read it back in to the field at the right time.

    But it was SO SLOW that I ditched it. That's the only luck I've had with a high level language solution within Infopath - everything else worked from an external program - e.g. decoding the BASE64 using VBA in Microsoft Xcel/Access.

    Low level language (for me anyway) like C# might have a better way - but if you want the jScript solution - let me know.

Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.