TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
698
1.3k
217.7k
Doesnt read correctly my barcode
Jun 8 2017 6:52 PM
Hi!
I am try to read my barcode with a barcode reader.
For example, I have a product with this barcode: 500148492783
Curiosly when I shoot on my barcode product its try to filter and suddently its stops and says this product doesnt exit. Its reads only the number 5 and cant continue to read the whole barcode.
This is my code:
private void txtCodProduct_KeyUp(object sender, KeyEventArgs e)
{
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test\App_Datas\test1.mdb;Persist Security Info=False";
OleDbConnection sqlCon = new OleDbConnection(connectionString);
sqlCon.Open();
string commandString = "select * from product where cod='" + txtCodProduct.Text + "'";
OleDbCommand sqlCmd = new OleDbCommand(commandString, sqlCon);
OleDbDataReader read = sqlCmd.ExecuteReader();
if (read.HasRows)
{
while (read.Read())
{
date.Text = read["date"].ToString();
product.Text = read["product"].ToString();
}
}
else
{
MessageBox.Show("this codproduct " + CodProduct.Text + " doesnt exist.");
}
read.Close();
sqlCon.Close();
Reply
Answers (
3
)
Update record based on date format in oracle using c#
Alignment question