Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Barcode 128 generator (using scalar function) Expand / Collapse
Author
Message
Posted Thursday, February 17, 2011 4:47 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 24, 2013 4:19 AM
Points: 67, Visits: 278
I'm looking for a barcode generating Function that uses the standard Code128. Apparently no function that fixes this has been posted before in the forum.

The way the barcode functions work is always the same: you pass a string with the source code ('bananas') and you get the coded barcode string ( ÑbananasÈÓ, always starts with capital Ñ and ends with Ó).

I have the right function in Access VBA (code attached), but I'm not able to translate this into SQL Server.

Does anyone have the equivalent SQL Server function (or knows how to translate this) ?

Thanks in advance, a.


  Post Attachments 
basCode128.txt (76 views, 3.77 KB)
Post #1065554
Posted Monday, April 08, 2013 4:20 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 7:41 AM
Points: 142, Visits: 1,642
The way the barcode functions work is always the same: you pass a string with the source code ('bananas') and you get the coded barcode string ( ÑbananasÈÓ, always starts with capital Ñ and ends with Ó).

I expect one or more of the functions/tools people have suggested will do the business.

But I wanted to point out that Code 128 is not quite like that. Unlike eg Code 39, it is not a straight character-for-character substitution, so just applying a font with static bracketing values doesn't work. It needs a calculated checksum (which is not shown in the human-readable version nor transmitted to the receiving system, but ensures the quality of the data read by the scanner), which is why you need to apply a function to the data you want to encode. And I do not think the control characters are universal - I have seen different font sets that have made different choices with regard to the extended characters they use to represent the control values. Presumably the ones you specify will work for your environment.
Post #1439735
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse