

The datatable shows no rows

My query is correct , However no records are coming in the Datatable Don’t know what is wrong
Please help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is most likely a problem with your communication with Sql Server. Here are some things to check:
1) That the exact same query returns results when run in SQL
2) The Sql Connection string you are running is not set to use a default schema different than the one that view is in.
3) The view does not return more than 1 dataset and/or table (filling a datatable directly will just take the first table in a dataset.
4) You are checking the data table after .Fill() is being executed and not before.
Please update us if that narrows your problem. Otherwise you’re going to have to post your OpenConnection code and your Sql view syntax.