Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
06-11-2007, 01:52 PM #1
Line 1: Incorrect syntax near....
I am currently in the process of migrating my website from an MS Access database to an MS SQL database. All seems to be going fine apart from I'm having the following error appear on a few pages:
Line 1: Incorrect syntax near '1'
The '1' varies and Ive seen it as a '#', '*' and others.
After removing some of the code Ive got it to work on one page by removing the following from a SQL statement:
WHERE Lastlogin > #" + dtmDatePast + "#
Has anyone experienced this problem before and/or knows a solution?
06-11-2007, 05:34 PM #2
- Join Date
- Sep 2004
- Thanked 40 Times in 40 Posts
In access you have to add the # signs around the dates. In MSSQL single quotes is what you want.
where date = 'some date here'
06-11-2007, 08:15 PM #3
Thanks for your help. It works great.