|
-
Jun 11th, 2010, 01:17 PM
#1
Thread Starter
Lively Member
Sql between and like
Hi Everyone!
I'm having a trouble with this line of code.
Rs.Open "SELECT * FROM Table WHERE Fname LIKE '%" & txtFname.Text & "%'" & " AND AVGRANK BETWEEN #1# AND #2#", con, adOpenDynamic, adLockOptimistic
How can i merge the 2?
I'm getting a syntax error in date in query expression.
Can somebody point me to the right direction?
TIA.
-
Jun 11th, 2010, 01:20 PM
#2
Re: Sql between and like
Thread moved to 'Database Development' forum (the 'VB6' forum is only meant for questions which don't fit in more specific forums)
1 is not a date, and neither is 2... so why have you marked them as dates?
For an explanation and examples of delimiters to use around values within SQL statements, see the article How do I use values (numbers, strings, dates) in SQL statements? from our Database Development FAQs/Tutorials (at the top of the Database Development forum)
-
Jun 11th, 2010, 01:24 PM
#3
Thread Starter
Lively Member
Re: Sql between and like
ok thanks for the input .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|