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

ODBC data sucessfully connects, but NEXT button doesn't work

Avatar

Not applicable

In short I have a forum which sucessfully gets the first record from the DataConnection.  The problem is I seem to only be able to get the first record and cannot navigate to other records.

I have added a NEXT button, set up for JavaScript, Client, on Click with the common xfa.sourceSet.DataConnection.next();      code, however when previewing the form (still within LiveCycle) even though I can sucessfully pull the first record from my table, clicking the 'NEXT' button does nothing at all, not even an error.

Any suggestions on what I am missing?

Other Info:

-I am using a MS Access database (.mdb format) with the Microsoft Access Database driver.

-I tried using both User and System DSN's in windows which I am calling when setting up the Data Connection.

-When configuring my DSN's the tests always succeed (and I can call the first record).

-Setting up the Data Connection in Adobe seems to work and shows all of the possible fields in my table.

-I bind my fields to the form, preview it, and see the first record in my table.

-I can add many types of buttons that work, such as printing, emailing, or changing pages of the form, but anything related to database record navigation is not working.

-I am positive that when I call xfa.sourceSet.DataConnection.next()  that the 'DataConnection' name is matching exactly my actual Data connection.(seems to be a common problem for people)

-I've followed about 3 different tutorials exactly and they seem easy to go through, but when they add their Next button it works fine.  Mine doesn't.

-I've tried starting from a new, blank project as well but cannot change records.

-I've even tried adding or removing the semicolon at the end of: xfa.sourceSet.DataConnection.next();

What am I missing?   Is there something potentially wrong with my data connection even though it seems to work?

Thanks.

-Mike

2 Replies

Avatar

Not applicable

Today I did some troubleshooting.  Instead of using MS Access I set up simple MySQL database with 3 text fields (no auto-incrementing fields).  Again I was able to quickly connect my LiveCycle form to the MySQL ODBC data source and display the first record from the table but any buttons with click actions that run and javascript lines beginning with xfa.sourceSet.{Name of my data source in LC here}.* commands do not work at all.

I know my buttons work.  I can run some xfa.host.messagebox("blah") commands to test that clicking the buttons triggers the javascript code, it's only the xfa.sourceSet.* lines that aren't working.

Now that I have even changed databases and ODBC drivers, what am I still doing wrong?  Once I set up the DataConnection in LiveCycle I am then right clicking on it to select 'Generate fields' or clicking and dragging the fields from my DataConnection to the form.  It displays the data, but why can't I work with it.

What am I doing wrong?

I am desperate.

Avatar

Not applicable

I aditionally turned on JavaScript debugging in Acrobat 9 Pro.  I am previewing in LC Designer, but would then save the LC project as a PDF and open it Acrobat Pro for it's javascript debugging 'capabilities'. 

The debugging doesn't do anything when I hit a basic 'print' or email' button on my form from within Acrobat, but if I click any of the Next/Previous/First/Last buttons etc it will fire up the debugger and point to my xfa.sourceSet.DataSource.[command]   line as if it were problematic, but I don't know how to get any useful info from the debugger in regards to what the problem actually is.