Livecyce show only first record from DB

Avatar

Avatar

TehnologiaInformatiei

Avatar

TehnologiaInformatiei

TehnologiaInformatiei

09-11-2020

Hello,

 

I created ODBC connection for Acces Database (.accdb)

I have a form with multiple fields, ex : Product Name, Product No.,Category , etc , and i dont know why my form show only first record "Product Name".

 

Can you help me ?

Thanks

 

 

Accepted Solutions (0)

Answers (2)

Answers (2)

Avatar

Avatar

TehnologiaInformatiei

Avatar

TehnologiaInformatiei

TehnologiaInformatiei

09-11-2020

Now i have a connection to the Access DB(.mbd) and everything works good. All what i did is to click "Build" and replace the DSN from ODBC Data Source Administrator with other Access DB (.accdb) with same tabels and same query. But in PDF forms i get only first column from first Table from DataBase.

TehnologiaInformatiei_0-1604992243637.png

Since I receive information from the database it means that the connection was made correctly, what I don't understand is why it doesn't bring all the records from DB.

Avatar

Avatar

Kosta_Prokopiu1

Employee

Avatar

Kosta_Prokopiu1

Employee

Kosta_Prokopiu1
Employee

09-11-2020

Your form should look somewhat like this here:

Kosta_Prokopiu1_0-1604911725866.png

Your Data View should show zhe ODBC connection with all the table fields available and they should all be bound (logo on the right). I am guessing that only your Product Name is bound? You can also see this in the Data Binding under the Binding tab on the right. Make sure they are all correctly bound.

Kosta_Prokopiu1_1-1604911976259.png

 

My working binding is "use name" instead of "$record.dataconnection..." . The problem appear when i change the database with other one identic. Choose Connection Proprietes , select the new ODBC user data source name, the query is correct... and when i open PDF file, it fills just first field...
Ok, why i want to replace the database .... I created a linked table in Acces, from an excel file, and when i modify values in excel, automatically updates in Access.. I use this solution for updating product lists in all pdfs in same time. .. The new database is a duplicate of first db (wich works fine)
And I wonder why it does so with the first field 🙂 Basically when you replace the data connection you loose the bindings. You can drag and drop the data cionnection fields on to your form-fields to get the binding right again. That should resolve it. Make sure that the little icons show with all your fields.
Yea, correct, but when replace de DB, binding still exist, because i dont delete the old connection, i just change the settings for existing connection 🙂 and livecycle keep all fields binded with fields from DB
Fair enough, but the "Use name" binding is definitely wrong and needs replacing to get the fields filled
Uhm, 😞 , for the moment my PDF`s are connected to a old access DB , and everytime when i want to upgrade product lists, i need to open Access and update manually to get the list updated in PDF`s. Do you have any ideea how i can automate that ? ... I the way i told you, with macro from excel who update automatically Access DB, all works fine, but for that i need to replace the DB connection in PDF . Is not a good ideea to re-bind all fields, because is a lot of them, and many PDF`s. Thanks
ok, first the problem: at some point in time you have lost the data bindings in fields (or you never had them in the first place). These MUST BE recreated - "Use Name" WILL NOT give you the data. The alternative would be scripting. How do you query the access db at the moment? Implicit as part of the data connection? In that case you need data bindings. If you keep the name of the dataconnection the same and also the field structure in the data connection stays, the binding strings "$record...." should work . What does not work is when you create a second data connection with different name and different fieldnames. That it cannot bring together. And what I wonder too is why you need to rebuild the data cnnection? You would update the accdb file with new records and that should suffice. Am I missing something?