what does mean this Error: Syntax error in FROM clause

Nader

Well-known member
Joined
Oct 9, 2008
Messages
55
Programming Experience
Beginner
It show me this error at OleDbDataReader = cmd.ExecuteReader

"Syntax error in FROM clause"
 
Well you are executing a SQL command. Post the syntax of the command that is being and run and then I or someone else can tell you what is wrong with your SQL. That object is executing code on a database and there is an error in that syntax.

i.e. SELECT *a FROM syscolumns

produces the error message

Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'a'.

The following is the correct syntax

SELECT * FROM syscolumns

It seems that the OleDb command parser is a bit more accurate and know that it is in your from clause. Make sure that the table exists, that your order by/ group by is valid, or that any joins that you may be performing use valid syntax.
 

Latest posts

Back
Top