Logging to Access Database at Print

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
LectonicsGH
Enthusiast
Posts: 8
Joined: Thu Aug 06, 2020 5:32 pm

Logging to Access Database at Print

Post by LectonicsGH » Mon Aug 10, 2020 10:16 pm

Hello,

My labels currently use one SQL database connection to pull information like internal and customer part numbers and revisions based on the Job Number. In printing, each label in a Job receives a unique Serial Number, and I need to log each serial number to an Access database with all the information, customer and internal, attached to it.

I've attempted adding "Save Variable" events to the Print button, but to no avail.
How might be the best way to go about this, or is there a sample I might refer to?

Thanks!

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 720
Joined: Mon Aug 28, 2017 3:07 pm

Re: Logging to Access Database at Print

Post by Kyleodonnell » Tue Aug 11, 2020 3:28 pm

Lectonics,

You will need to use SQL in order to right to a database such as access, the save data to file is really only for text based files like csv. As this is a custom request, there is no sample out of the box. However we have created one for you. In the sample we use a linear function to add the counter, as counters in the software only update after printing is done, we then loop the addition of a counter and then write to an access database using SQL.
actions.PNG
actions.PNG (24.08 KiB) Viewed 1131 times
Please take a look at the attached sample
Attachments
Countersample.zip
(25.61 KiB) Downloaded 95 times

mc138138
Newcomer
Posts: 1
Joined: Thu Dec 17, 2020 8:45 pm

Re: Logging to Access Database at Print

Post by mc138138 » Thu Dec 17, 2020 8:53 pm

Hello, I am learning about software, how I need to configurate to see on my printer display # of pieces to print?
I have a Avery 6404

Thank you

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 720
Joined: Mon Aug 28, 2017 3:07 pm

Re: Logging to Access Database at Print

Post by Kyleodonnell » Fri Dec 18, 2020 4:32 pm

LectonicsGH

Please submit a support ticket https://www.nicelabel.com/support/techn ... gn=Support

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 720
Joined: Mon Aug 28, 2017 3:07 pm

Re: Logging to Access Database at Print

Post by Kyleodonnell » Fri Dec 18, 2020 4:33 pm

mc138138

Please submit a support ticket https://www.nicelabel.com/support/techn ... gn=Support

LectonicsGH
Enthusiast
Posts: 8
Joined: Thu Aug 06, 2020 5:32 pm

Re: Logging to Access Database at Print

Post by LectonicsGH » Wed Mar 17, 2021 2:03 pm

Hi Kyle,

The Insert Into function worked perfect for my test table, "SerNoLogging", but I'm having some issues sending data to our established tables.
One of our tables is called "non-logging SN table", another is "Serial Number Logging". I've tried this in quotations and parenthesis, but I'm still getting an error. Is there a method for grouping text with spaces in names like this? Or perhaps it's the keywords, "table" and "Number" that cause the issue...

I can't change the table names as that would break the designs on our old system, which we'll need until I've fully converted all designs to NiceLabel. I also MUST have the data sent to "Serial Number Logging" because another software we use pulls data from that table in particular.

Post Reply