Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Connecting to SQL Server.

Not applicable
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!
10 Replies
pguerett
Level 10
Level 10
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.
Not applicable
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
pguerett
Level 10
Level 10
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?
Not applicable
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.
pguerett
Level 10
Level 10
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.
Not applicable
yea. I've replaced it with the name i gave for my dataconnection.
pguerett
Level 10
Level 10
Then I do not know what the issue is ...you seem to have set it up correctly. I have used SQLServer before without issue.
_Jenn_Dickens_
Level 2
Level 2
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.
Not applicable
thank Q Jenn, i am running it in formcalc envirnoment. but i still have the problem.
_Jenn_Dickens_
Level 2
Level 2
I assume that you have set up the data connection and that you named this data connection "DataConnection" and bound the fields that you want to see information in. I know these are basic questions, but when I'm frusterated, I sometimes forget the simplest things. These are some simple things that I have either thought I did, or forgot to do/redo. When I am in the midst of design and testing.



Jenn D.