|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Syntax error in SQL Statement
I have re-used this code from another project, however when i place it in my new project, i get a syntax error.
SQLQuery = "SELECT * FROM User WHERE Username = '" & user & "'" It says I have a syntax error in the FROM Clause. My old project did that line fine. Now, It will only work if I put [ ] around User ..... [User] . WHy is this the case? THanks, Mick |
|
#2
|
||||
|
||||
|
Are you using the same database types (ie: Access, SQL Server, etc.) for both projects?
User could be a reserved word. It's best to stay away from reserved words for column names. |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Syntax error in SQL Statement |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|