Wednesday, March 30, 2011

Key Learnings Abdul Azeem Khan

Problem:  
Incorrect Syntax Near “.” during DataAdapter.Fill

Impact:
Your program hangs and you are not able to access the data from the database


Solution:
If you have a SQL statement such as this:
            string statement = "Select title, addDateTime, keyword_id, keyword, lang_id" +
"FROM tableX"; 


the problem is caused due to the lack of space after "lang_id", to solve the problem just put in an extra space, so it would be "lang_id ".
 

No comments:

Post a Comment