Results 1 to 5 of 5

Thread: [RESOLVED] Fox Pro Database SQL when using variables

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2003
    Posts
    259

    Resolved [RESOLVED] Fox Pro Database SQL when using variables

    i have a vb.net 2010 app i trying to connect a dbf file. i think its a fox pro database. i can connect to it fine and get all data from a column just fine. the problem is when i use the WHERE clause i dont know how to surround the variable since i have never used this type of database before now. this is what i have

    Code:
    Dim oCmdSelect As New OleDbCommand("SELECT LASTNAME, FIRSTNAME FROM UPDATED WHERE LASTNAME = lstItems1.Items(x).ToString, FIRSTNAME = lstItems2.Items(x).ToString", oAccessConn)

    so the lstItems1.Items(x).ToString is a listbox entry. i basically have a list box with about 800 names. i what to open the database to see if they exist in it with i guess a while loop, not sure about that yet. but i have searched everywhere and i can find out how to surround the lstItems1.Items(x).ToString
    Last edited by seanwpb; Mar 1st, 2013 at 10:36 AM. Reason: typo

Posting Permissions

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



Click Here to Expand Forum to Full Width