Answered by:
Select query not getting data

Question
-
i am using a query in my asp.net application "select * from tablename" it is not working. the table is in relationship with two other table i removed relation but still not working. the same query is working for the other table
- Moved by Kalman Toth Thursday, March 19, 2015 4:10 PM Not database design
- Moved by Carl Cai Wednesday, March 25, 2015 8:41 AM asp.net forum is for web Dev issues
Monday, March 16, 2015 6:47 AM
Answers
-
- Proposed as answer by Michelle Li Thursday, March 19, 2015 6:13 AM
- Marked as answer by Just Karl Wednesday, April 8, 2015 9:26 PM
Monday, March 16, 2015 8:23 AM -
i am using a query in my asp.net application "select * from tablename" it is not working. the table is in relationship with two other table i removed relation but still not working. the same query is working for the other table
Hello,
It is not clear why this thread moved to VB.NET forum, but it seems that your issue is mainly related to web development, you could consider posting this issue in https://forums.asp.net forum to get support.
Regards,
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Marked as answer by Just Karl Wednesday, April 8, 2015 9:26 PM
Wednesday, March 25, 2015 8:41 AM
All replies
-
"Not working" - Could you please explain with any error message that you are getting?
Check out:
1. your application connection string is pointing to the right database at right server.
2. Confirm you have table called "tablename" in the database.
Provide us error message to help you better.
Please mark this reply as answer if it solved your issue or vote as helpful if it helped.
[Blog]Monday, March 16, 2015 6:50 AM -
- Proposed as answer by Michelle Li Thursday, March 19, 2015 6:13 AM
- Marked as answer by Just Karl Wednesday, April 8, 2015 9:26 PM
Monday, March 16, 2015 8:23 AM -
lastly I have to put
127.0.0.1 to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\SQLServerAgent\ServerHost
...
don't know why`
set to localhost also not ok~!!!
because when ping localhost it replies.. some problem
Monday, March 16, 2015 8:48 AM -
sorry~~ i replied to a wrong discussionMonday, March 16, 2015 9:38 AM
-
Hi Ifitikhar,
According to your description, the select statement in the asp.net application doesn't work. Besides Latheesh's and Olaf's posts, the issue could also occur when the login has no select permission on the table you use.
So please check if the error indicates that there is no SELECT permission on the table. If so, you could login using the login account with sysadmin server role and grant the select permission on the table as the following:
grant SELECT ON OBJECT:: schema.tableName TO loginName;
GO
Regards,
Michelle LiThursday, March 19, 2015 7:03 AM -
i am using a query in my asp.net application "select * from tablename" it is not working. the table is in relationship with two other table i removed relation but still not working. the same query is working for the other table
Hello,
It is not clear why this thread moved to VB.NET forum, but it seems that your issue is mainly related to web development, you could consider posting this issue in https://forums.asp.net forum to get support.
Regards,
Carl
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- Marked as answer by Just Karl Wednesday, April 8, 2015 9:26 PM
Wednesday, March 25, 2015 8:41 AM