如何在条形码库存系统VB.NET中插入值(没有任何按钮点击) [英] How to insert value in table in barcode inventory system VB.NET (without any button click)

查看:79
本文介绍了如何在条形码库存系统VB.NET中插入值(没有任何按钮点击)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在表中插入值。我正在制作条形码库存系统。我拿了一个文本框来输入条形码,其文本更改值将加载。但我的问题是如何在文本框的文本更改中自动添加表中的值。



我尝试过:



我已完成文本更改意味着我加载了文本更改的数据,但我必须按下按钮然后只有我正在保存。我想自动做。

解决方案

你唯一的问题是确定用户何时输入了整个代码并且很高兴它是正确的 - 这就是为什么你有ENTER键!

ENTER是用户说它就在那里,而且一切正确 - 把它放在数据库中的方式;任何自动方式都会依赖于计时(用户几秒钟内没有输入任何内容)或输入的位数,这两种方式都会出错:

1)时间是一个如果用户中途通过并且无法轻易读取下一个数字或被中断,则会出现问题。依靠它是一种很好的方法,可以将不良数据导入数据库,同时减慢整个输入过程。

2)如果用户输入错误键,数字计数就会出现问题:意外敲击两个键同时,或输入一个坏数字 - 除非你给用户一个纠正错误的机会,你的数据库完整性很快就会变得可疑。

3)当你看到真实时,数字计数也会出现问题世界条形码数据 - 有很多不同类型的条形码,它们并不都具有相同的数据长度!



说实话,依靠用户条形码数据的输入首先打破了使用条形码的整个想法:我使用扫描仪并将其配置为提供引入和跟踪序列,以完全消除键控错误,并确保正条形码数据检测

i want to insert value in table. I am making barcode inventory system. I took one text-box for entering barcode on its text change value will load. But My question is How can i automatically add values in table able sometime on text change of text box.

What I have tried:

I have done on text change means i loaded data on text change but i have to hit enter on press button then only i is getting save. i want to do automatically.

解决方案

The only problem you have is identifying when the user has entered the "whole code" and is happy it's correct - that's why you have the ENTER key!
ENTER is the way the user says "it's all there, and it's all correct - put it in the DB"; any automatic way would rely on timing (the user hasn't entered anything for a few seconds say) or the number of digits entered, and both of those are subject to errors:
1) Timing is a problem if the user gets halfway through and can't read the next digit easily, or gets interrupted. Relying on it is a good way to get bad data into your DB, as well as slowing up the whole input process.
2) Digit count is a problem if the user misskeys: accidentally striking two keys at the same time, or entering a bad digit - unless you give the user a chance to correct mistake, your DB integrity becomes suspect very quickly.
3) Digit counts also give problems when you look at "real world" barcode data - there are a lot of different types of barcodes, and they don't all have the same data length!

To be honest, relying on user input for barcode data defeats the whole idea of using barcodes in the first place: I'd use a scanner and configure it to provide "lead in" and "trail out" sequences to both remove keying errors completely, and ensure positive barcode data detection.


这篇关于如何在条形码库存系统VB.NET中插入值(没有任何按钮点击)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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