3 Replies Latest reply on Feb 9, 2014 3:14 AM by NKAdobe2011

    submitting the form data into sql database

    Arshad Kar

      i am evry much new to adobe live cycle  with very hard efforts i have designed an admission form for students which i am expected to upload on my website for download purpose. I have put one button on the button with control type submit and in the submit tab i select the submit  type as xml. and i put an ftp account of my website on the url box but from that i dont know how to make it functional because when i am trying it preview and click on submit button it promts me for ftp user id and password and there after nothing comes on the url address. Please help me in this regard or is there any other way to sumit the filled data on the sql server via submit button.   plzzz help me in out i need the soft data of the admssion forms for report purposes

        • 1. Re: submitting the form data into sql database

          Instead of FTP, you would find greater success submitting to a server-side script, such as ASP.net or PHP, then parse the XML data into a ADO.net datarow.

           

          For online ASP.net examples:

          http://www.fdftoolkit.net/examples/

          • 2. Re: submitting the form data into sql database
            Arshad Kar Level 1

            i found them usefull but i am confused how to implement them.

            • 3. Re: submitting the form data into sql database
              Level 1

              Inspect the source code of example # 04

              http://www.nk-inc.com/software/fdftoolkit.net//examples/viewsource.aspx?ex=04

               

              Sorry, but if you don't have programming experience, you will probably need to hire a web developer.

               

               

              Parsing XML and inserting into a SQL database is pretty straight forward.

               

              Put FDFApp.dll, and iTextSharp.dll in the bin directory, and reference the libraries in your visual studio .net project.

              FDFApp.dll can be found: http://fdftoolkit.codeplex.com

               

              Then create an ASP.net web page, and call the subroutine (Example_Data_Input) on the page load event.

               

              Public Sub Example_Data_Input()   

              Dim cFDFApp As New FDFApp.FDFApp_Class 

              Dim cFDFDoc As New FDFApp.FDFDoc_Class 

              ' INITIALIZE FDFDOC Class AND OPEN FDFDOC FROM REQUEST STREAM  

              cFDFDoc = cFDFApp.FDFOpenFromStream(Request.InputStream, True

              Dim tableName as string = "tablename"

              Dim sqlConnectionString as String = "PUT SQL CONNECTION STRING HERE"

              Dim ds As New DataSet

              Dim da as new System.Data.SQLClient.SQLDataAdapter("SELECT * FROM [" & tableName & "]",sqlConnectionString)

              Dim cmd as new System.Data.SQLClient.SQLCommandBuilder(da)

              da.Fill(ds,tableName)

              If Not cFDFDoc Is Nothing Then 

              ' CREATE NEW DATA ROW 

              Dim dr As DataRow = ds.Tables(0).NewRow 

              ' SET DATA ROW FIELD VALUES FROM FDF DOC Class Field Values 

              dr("FullName") = cFDFDoc.FDFGetValue("FullName") & "" 

              dr("Email") = cFDFDoc.FDFGetValue("Email") & "" 

              dr("City") = cFDFDoc.FDFGetValue("City") & "" 

              dr("State") = cFDFDoc.FDFGetValue("State") & "" 

              dr("Country") = cFDFDoc.FDFGetValue("Country") & "" 

              ' ADD ROW TO DATA TABLE 

              ds.Tables(0).Rows.Add(dr) 

              ' UPDATE DATASET 

              da.Update(ds,tableName)

              End If 

              End Sub