Highlighted

Connecting to SQL Server.

Avatar

Guest

06-01-2009

I am trying to connect to SQL Server from my livecycle workbench. Both of them are on different servers. I am using xfa.sourceSet.DataConnection.next() to point the values in the database. It pops up an error saying that no parameter found for my dataconnection.



Can anyone suggest me how to connect a form to database.



I also want to read records values and update the same if i have any changes to be made to those records.



Thank You!

Replies

Highlighted

pguerett

07-01-2009

Are you connecting to the DB from the form or from a process? If it is from a form you have to setup a DSN in Windows before you try to connect.
Highlighted

Avatar

Guest

07-01-2009

im trying to connect it from the form.

I did setup the DSN in windows before i used that in forms dataconnection . But still it says that no parameter found for my dataconnection.

When i do the test connection, it works fine

but it wont work within the form
Highlighted

pguerett

07-01-2009

If you set things up correctly and you bind the database fields to fields on your form then when the form loads you shoudl see the 1st record in your DB populating the form. Is this the case?



Are you using Acrobat or Reader to view your form?
Highlighted

Avatar

Guest

07-01-2009

Exactly Paul,<br /><br />I just see the very first record in the database. I used xfa.sourceSet.<DataConnName>.next()<br /><br />I am using WorkBench ES 8.2 and i view my pdf in preview pdf tab.
Highlighted

pguerett

07-01-2009

So that means that the connection to the database is being established correctly. Are you replacing the name <DataConnName> by the root node nome in the dataview window in Designer? By defult it is DataConnection. Note that this name is case sensitive.
Highlighted

pguerett

07-01-2009

Then I do not know what the issue is ...you seem to have set it up correctly. I have used SQLServer before without issue.
Highlighted

_Jenn_Dickens_

07-01-2009

I have this problem sometimes when I forget to change the script Language to FormCalc.



In my VERY limited experience, I believe xfa.sourceSet.DataConnection.next() is a FormCalc expression... please forgive my ignorance if I am wrong...



Jenn D.