Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

C#, barcode scanners, and MySQL

Status
Not open for further replies.

webslinga

Programmer
Jun 20, 2006
55
US
Hey all,
How are you all? I need to develop an application that reads in a barcode scanner's data (using the SDK written in vanilla C/C++), connect to a MySQL server and drop some data in it.
Is this possible using Microsoft Visual C# Express Edition? Thanks for the prompt reply.
 
Let me clarify, the barcode Scanner's SDK is written in vanilla C/C++. Thanks for helping out a beginner.
 
I just got finished writing a barcode scanning application with C# 2005. We use Oracle for the backend store but you may want to look into using a .NET data provider for MySQL, if one exists.

Below is a link to a trial version, but you may be able to find a good free version out there.


Here is a link to use a MySQL provider


The mySQL home page may have some other links.
 

This adapter is written for 2003 but should work in 2005 - possibly without a few of the new "fancy features"

Why are you using a barcode SDK? What kind of barcode scanners are you using?

There's a lot of good barcode readers out there that act as a simple keyboard and have a USB interface. You can also use the Free 3 of 9 barcode font to produce your own barcodes if you needed.
 
Why are you using a barcode SDK? What kind of barcode scanners are you using?

Excellent question JurkMonkey. I am using Symbol Technologies CS1504. It has the capability to store ~150 barcodes read and can plug in to a USB port. With this model, I do not believe I can simply click on a blank form field and have the scanner spit out the next barcode.
 
I would really have to request to read the data from the csp2 data.
 
Is this a wireless barcode scanner? What will its usage be? Are you walking through a warehouse to scan items on the fly expecting to see info about the product directly on the scanner? Or are you sitting at a cash register with the barcode scanner plugged into the terminal directly and displaying the info on the application?
 
I assume the Barcode Scanner SDK is provided as a DLL? If so, you will want to have a look at the System.Runtime.InteropServices namespace.

You can declare DLL API calls something like this:
Code:
using System.Runtime.InteropServices;

...

    [DllImport("user32.dll", CharSet = CharSet.Auto)]
    public static extern int MessageBox(IntPtr hWnd, String text, String caption, uint type);

Then you just call the function like any other.
 
Thanks for your post guys,
We have decided to go with a Microsoft Access/VBA solution for this project. Thanks again for all your help and feedback.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top