No Records Found/Multi Database/VB Script but is on screen S’abonner
Bartender/Commander 10.1 SR3 on 2008 R2. Been using and working for years now. We drop .dd (txt) files into a folder and Commander picks it up and sends to printer. Recently had request to add a field on label based off a value passed to the label from the .dd file. The value for new field is in a SQL database, so the label would have to look it up when executed.
First attempt: Created additional Database Connection using wizard, Microsoft SQL Server. Joined text file database (the .dd file) to the appropriate SQL table (and found out only 1 join can be made, and has to be INNER, but no big deal). Using test file in designer mode, label took ~4 minutes to preview, but correct data was there. Test with preview mode, but bartender just froze. Must be timeout issue, not surprised, table has a million records. But data was on screen, so looks good.
Second attempt: Created temp table containing one record to prove proof of concept. Designer comes back immediately with correct data on label. Test using with preview mode and got No Records Found. Dropped into Commander and got No Records Found log entry.
Third attempt: Created local text file containing target data so no SQL connection over network. Two records in text file. Created Database Connection on Text File, joined on appropriate field. Test file worked using both records in designer mode. Print Preview again showed No Records Found. Same with Commander of course
Fourth attempt: started over. Added text field and then used Multi Line VB script to create OLEDB connection and retrieve required data from SQL table. After getting the code right, it works quickly, beautifully...in designer mode. Surely this will work now! No Records Found.
Every time, the correct retrieved data has been on the screen. Every time, Print Preview and Commander has returned No Records Found. What am I missing?
Thanks in advance for any help on this.
Don't know if this will help or if the screenshot can be included in this post, but below is a picture of the label with the correctly retrieved data circled.
Veuillez vous connecter pour laisser un commentaire.