Quantcast
Channel: VBForums - Database Development
Viewing all articles
Browse latest Browse all 2918

[RESOLVED] Fox Pro Database SQL when using variables

$
0
0
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

Viewing all articles
Browse latest Browse all 2918

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>