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: Thursday, June 26, 2014 2:21 AM
Points: 68, Visits: 279
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 (80 views, 3.77 KB)
Post #1065554
Posted Monday, April 8, 2013 4:20 AM
SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Friday, July 25, 2014 8:35 AM
Points: 142, Visits: 1,684
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
Posted Thursday, June 26, 2014 2:23 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, June 26, 2014 2:21 AM
Points: 68, Visits: 279
It depends on what it does. There are literally hundreds of barcode formats, even inside the 128 format there are are multiples ways of calculating the output of a given entry.

The VBA code attached to my 1st message works and it's not that difficult to translate to other languages.
Post #1586285
Posted Thursday, June 26, 2014 2:27 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 12:04 AM
Points: 1,783, Visits: 5,671
a_ud (6/26/2014)
It depends on what it does. There are literally hundreds of barcode formats, even inside the 128 format there are are multiples ways of calculating the output of a given entry.

The VBA code attached to my 1st message works and it's not that difficult to translate to other languages.


Don't bother - that post you replied to is spam.


MM


  • MMGrid Addin
  • MMNose Addin


  • Forum Etiquette: How to post Reporting Services problems
  • Forum Etiquette: How to post data/code on a forum to get the best help - by Jeff Moden
  • How to Post Performance Problems - by Gail Shaw

  • Post #1586286
    « Prev Topic | Next Topic »

    Add to briefcase

    Permissions Expand / Collapse