Results 1 to 2 of 2

Thread: .dbf query help

  1. #1
    Join Date
    Jul 2009

    Unanswered: .dbf query help

    I am trying to figure out how to make my program look into a database and pull one item.

    For example, one of my tables has 2 columns, EMPLOYEE and PIN. Now the program (main form, ie form1) has a text box asking for a pin, then a button. I want to have it so when a number is entered and the button is clicked, the program looks in the database, finds that pin, then places the corresponding name into a variable. I managed the connection string (ODBC) and can see all the records from within visual studio, I just don't know what commands to use to query for that one piece of information and then how to bring it to the program and store it.

    I haven't touched VB in sooo long and could really use a hand! These are simple .dbf files if that makes any difference.


  2. #2
    Join Date
    Jul 2009
    * open ur database using ADO or DAO connection
    * make a query out of it where the qualifier is the pin.
    * open the recordset
    * if found then store it in a variable
    * if not found message box "pin not found."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts