如何在asp中实现条码扫描器 [英] how to implement barcode scanner in asp

查看:478
本文介绍了如何在asp中实现条码扫描器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的老板让我建立一个用于审计公司固定资产(fa)的系统。他们希望系统必须是一个网站(asp或php对我来说还可以)。创建网站不是问题,我的大问题是无线条码扫描器如何与我的网站和数据库进行交互?或者可以将无线扫描仪与网站和数据库进行交互?你可以给一些参考或样本代码来学习。



thnx很多。

my boss ask me to make a system that are use to audit the fixed asset(fa) of the company. they want the system must be a website(asp or php is ok for me).create the website is not the problem, my big problem is that how the wireless barcode scanner interact into my website and database? or it is possible to interact the wireless scanner to the website and database? can you give some referrences or sample codes to study.

thnx a lot.

推荐答案

条码扫描器在连接主机PC时通常有两种口味。



1.它们通过USB或旧的PS2端口作为HID连接。 />
在这种情况下,扫描仪可用作键盘,您扫描的任何内容都将显示在活动输入控件中。

此设置的好处是无需编程即可使用条形码扫描仪,但您只能扫描到聚焦输入框。



2.扫描仪连接到专用端口

通常这是一个COM端口,可以是物理RS232端口或虚拟COM端口。

还有扫描仪使用以太网供电,然后使用TCP / IP通信。

在任何一种情况下,您都有编写代码来监听连接的端口,在数据到达和发送时读取数据它到正确的输入框。



对于你的扫描仪,你必须找到它与主机PC的连接方式。

你说它是无线的。是WiFi,蓝牙还是别的什么。

您需要做的是阅读有关扫描仪的文档,以便了解它的类型,并下载驱动程序以及供应商提供的一些示例应用程序。



我知道这是一个非常一般的答案,但没有任何具体细节,很难说更多。
Barcode scanners usually comes in two flavours when it comes to the connection the host PC.

1. The are connected as a HID either via USB or the old PS2 port.
In this case the scanner works as a keyboard and anything you scan will appear in the active input control.
The benefit with this setup is that it requires no programming in order to use the barcode scanner, but your are limited to scan to the focused input box.

2. The scanner is connected to a dedicated port
Usually this is a COM port, either a physical RS232 port or a virtual COM port.
There are also scanners that uses Power Over Ethernet, and then of course uses TCP/IP communication.
In either case you have write code to listen to the connected port, read the data when it arrives and send it to the correct input box.

For the scanner you got, you have to find out how it is connected to the host PC.
You say it is wireless. Is it WiFi, Bluetooth or something else.
What you need to do is to read the documentation about the scanner so you know which type it is and also download drivers and maybe some example applications from the vendor.

I know this is a very general answer, but without any specific details it is difficult to say more.


这篇关于如何在asp中实现条码扫描器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆