c# - Populate textbox after scanning barcode -


Is it possible to obtain data from the database after scanning the barcode? For example, my student ID is 201312345, after scanning my ID, is it possible to fill the text boxes with names, addresses, courses such as Atex? Thanks

Yes it is possible!

Put the scanned student ID in one variable, create a query where you select things from your database, where you want

example:

SqlCommand sqlSelectStudentData = new SqlCommand (SELECT * FROM tablename WHERE studentid = @ studentid);

sqlSelectStudentData.Parameters.AddWithValue ("@ studentid", 'Your Scanned Student ID');

In some labels, the values ​​returned from the query or the objects that you want.

Good luck!


Comments