Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

input barcodescanner

 
   Database Help (Home) -> Visual Basic RSS
Next:  NewB : How can I use automatic links in PHP  
Author Message
Sparkey

External


Since: Feb 12, 2005
Posts: 1



(Msg. 1) Posted: Fri Feb 11, 2005 10:40 pm
Post subject: Re: input barcodescanner [Login to view extended thread Info.]
Archived from groups: comp>lang>basic>visual>database (more info?)

Not a bad idea, but I used a slightly different approach, you create an
input loop, then test each character for the carrage return, and continue to
loop the input till you get the carrage return. Almost every barcode scanner
adds it... That way you always get a good read, no matter how long the
string you are getting from the barcode.


Mark


"Randy Day" wrote in message

 > W. Boon wrote:
  >> Does anyone know how to write a procedure in VB6 for a barcodescanner. I
  >> cannot automize the reading to processing. PE I can make de reading of
  >> the barcode, but i cannot make a search in a database without a button or
  >> something like that to continue the process. I want to read the barcode
  >> and directly start the search in the database.
 >
 > Put a timer on your form, with an interval (50-100ms)
 > that is long enough to allow the scanner to finish
 > sending the barcode. Set the timer.enabled=false.
 >
 > When your program detects the first char of a
 > barcode, enable the timer. Put your database search
 > in the timer event, like this
 >
 > Private Sub Timer1()
 >
 > Timer1.enabled=false
 >
 > 'IMPORTANT! Disable timer *before* doing search!!
 >
 > CallYourDatabaseSearchProcedure()
 >
 > End Sub
 >
 > This way, the database search is delayed until
 > the barcode is complete, and since the timer
 > disables itself, it won't fire again until another
 > barcode is entered.
 >
 > Play with the timer interval to find one that gives
 > a quick response while allowing the barcode to
 > complete.
 >
 >
 > HTH

 >> Stay informed about: input barcodescanner 
Back to top
Login to vote
Randy Day

External


Since: Oct 06, 2003
Posts: 50



(Msg. 2) Posted: Sat Feb 12, 2005 12:15 am
Post subject: Re: input barcodescanner [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Sparkey wrote:
 > Not a bad idea, but I used a slightly different approach, you create an
 > input loop, then test each character for the carrage return, and continue to
 > loop the input till you get the carrage return. Almost every barcode scanner
 > adds it... That way you always get a good read, no matter how long the
 > string you are getting from the barcode.

You may still want to keep my solution on hand.
Not all scanners append a postfix carriage return.
Instead, some insert a *prefix* ASCII char.

For all I know, there may be units out there that
do both - or neither.

The scanners I first worked with sent a prefix,
which is why I had to come up with the timer.

If you *always* use the same brand scanner, you'll
have no problem your way; if a user wants a
different scanner, you may have some recoding to
do.

Mine's just a bit more universal; if you want,
test the first and last char, and drop any that
don't conform.

 >> Stay informed about: input barcodescanner 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table "PriceList" and there a column "Pricemk" wich is data type "money". All data in this column is in form "10001,35". So why when...

arrays - is there a way to concatenate the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a datareport for example after 5 records printed. Thank you all

Possible Use of a Cursor - I have a complex query that I hope I can explain it well enough for everyone to understand. I have a table that contains information for work instructions. Contained in the table are "MACHINE_PROC" these are groupings of machining processes....

Scroll Bars - Is there a way to find the size of scrollbars on a system using Visual Basic 6.0? I know how to look and change them on the display properties, but I don't know how to access that information from within Visual Basic.
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]