Setting up access to SQL DB in Visual Basic - InfoPath Dev
in

InfoPath Dev

Setting up access to SQL DB in Visual Basic

Last post 05-23-2006 04:30 AM by uma. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 05-22-2006 01:20 PM

    • Adub21
    • Not Ranked
    • Joined on 05-18-2006
    • USA
    • Posts 25

    Setting up access to SQL DB in Visual Basic

    Hi. I need to set up some database connections in VB to a SQL Server environment. Does anyone know what I need to add to the managed code section in order to get this to work?

    Any help would be greatly appreciated. I know somewhere along the line I saw something for this a while ago but all of this stuff is so new to me, I can't remember where I saw it.

    Thanks!
  • 05-23-2006 04:30 AM In reply to

    • uma
    • Top 500 Contributor
    • Joined on 12-23-2005
    • Posts 35

    Re: Setting up access to SQL DB in Visual Basic

    Hi,
    You can set up the SQL database connection by taking as main data connection for your InfoPath form to submit the data to a database. And you can set up the SQL database connection as secondary data connection to receive the data from a database. And you can submit the data using rules with out using managed code.
    If you want to submit the data using managed code use the dataadapters as given below in onSubmitRequest event.

    function XDocument::OnSubmitRequest(eventObj)
    {
    var submitAdapter = XDocument.DataAdapters("Main submit");
    submitAdapter.Submit();
    eventObj.ReturnStatus = true;
    }

    You can get the similer instructions in the given below link to set up a database connection( but it includes the example by using access db instead of sql)

    http://office.microsoft.com/en-us/assistance/HA011199501033.aspx

    I hope, it will help you.
Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.