hi we are doing ATM project in VB.NET using sql connection....how to create database in sql...there are two labels in my project namely pinno and acctno.i had database with three fields pinno ,acctno and amt.how to check the details i entered in textbox1,textbox2 are same when compared with database...pls answer me..

Recommended Answers

All 2 Replies

You'd run a query like this:

"SELECT * FROM MyTable WHERE pinno =" &textbox1.text &" and acctno = " &textbox2.text

If you get no data back then there is not a match...

And to add what G.Waddell posted, I would do 1) Clear your text boxes and place the cursor in the first text box and 2) add a counter, After so many false tries, deny entry (The user doesn't know the correct password. It may need to be reset). I'd also display a message to the user about the pinno being invalid. IOW, provide some feed back to the user.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.