Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Connecting to SQL Server.

Avatar

Former Community Member
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

Avatar

Former Community Member
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.

Avatar

Former Community Member
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

Avatar

Former Community Member
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?

Avatar

Former Community Member
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.

Avatar

Former Community Member
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.

Avatar

Former Community Member
yea. I've replaced it with the name i gave for my dataconnection.

Avatar

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

Avatar

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.

Avatar

Former Community Member
thank Q Jenn, i am running it in formcalc envirnoment. but i still have the problem.

Avatar

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.