Bahatmut
Active member
I would like to thank all fo you who helped me get my other problem fixed first of all. Now I am in the process of optimizing it, and looking into how to do thigns more efficently for that code, and another project. This time, I am trying to build a Query for the OleDB that will pull the records out that are between a certain range(to allow for faster searching). I found the help paged and MSDN pages for the BETWEEN and and WHILE components, but the trick is, the ranges of data I need to pull change. I was trying this Query statement, but was getting errors when the actual datareader tried to execute
I tried putting an extra parentehesis aroudn the Cint's, but that didn't work either. Is there anyway to use user entered values in constructing the SQL query? This is also 2 fold, as I also think this approach is how I can pull out multiple records that have a common peice of data, but if I can't figure out how to pass the info to match to into the Query, it will be very very ugly and slow code indeed.
VB.NET:
"SELECT Ref FROM Videos WHERE Ref BETWEEN Cint(TextBox2.Text) AND Cint(TextBox3.Text)"
I tried putting an extra parentehesis aroudn the Cint's, but that didn't work either. Is there anyway to use user entered values in constructing the SQL query? This is also 2 fold, as I also think this approach is how I can pull out multiple records that have a common peice of data, but if I can't figure out how to pass the info to match to into the Query, it will be very very ugly and slow code indeed.
Last edited: