Click here to Skip to main content
15,885,032 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I build a asp.net website, sometimes it says "Unspecified error", it happens sometimes, not always:
C#
 string query = "SELECT TOP 1 * FROM AboutUs";
 var reade = AccessHelper.GetReader(query);      // Unspecified error occurs here
 reader.Read();
 // ..read things

DataSet data = AccessHelper.GetDataSet(narstr);
Repeater1.DataSource = data;

some people say that I use the reserved keywords like query, and reader, It seems that if I change the variable name to something else, the website will wrok properly. But I don't think this is the problem,
I didn't use the query, reader in the SQL statemtent.
I think the problem is that I forget use Close() method somewhere.

I want to know the code above whether has naming problem.
Posted
Updated 10-Nov-13 15:27pm
v3

1 solution

I am not getting your full code so not sure why this error coming but this is for sure that, this is not a naming style related problem. Use a try catch block to get the exact error message.
 
Share this answer
 
Comments
Orcun Iyigun 11-Nov-13 1:36am    
And I am pretty sure this is not a SOLUTION!!! To be more specific this should be a comment!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900