Search

Friday, April 4, 2014
4 comments

How to fix Incorrect syntax near the keyword from in ASP.NET

8:09 PMFriday, April 4, 2014
Today i facing a new problem that is
Incorrect syntax near the keyword from
I am receiving this error message when i retrieve the record from the database table, this code is successfully run in visual studio 2010 or earlier but not successfully run in vs 2012 or higher. So I think about that error and solve the problem that is

Incorrect syntax near the keyword 'from'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'from'.

Solution 

use brackets around the table like

Select * from [products]

If you use aggregate operators  query then should use '()' like

Select count (*) from [products]

Protected by Copyscape Online Copyright Protection Software

4 comments :

  1. I really need to have or to share this all in one site.It has a total package that you are longing to look for great idea with it and very interesting details ..GOOD JOB for that!

    PIC Scheme Singapore

    ReplyDelete
  2. I really like your blog
    Thanks for sharing ...
    PIC GRANT

    ReplyDelete
  3. I will try to make a point to make this article your one stop to find the best...

    Read More: sgicv.com.sg/

    ReplyDelete

 
Toggle Footer
Top