TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ghasem deh
NA
258
39.9k
What is the cause of the error ?
Jan 28 2015 9:03 AM
i want
to read the data table and the previous value of a field, the value I add ...
But it gives the following error:
In relation to the connection !
http://s4.picofile.com/file/8166859342/1errror_mojodi.jpg
i use this code :
int a = 0;
try
{
SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=Shopping;Integrated Security=True");
SqlCommand com = new SqlCommand();
com.CommandText = "SELECT TOP 1 Mojodi FROM TMojojdi ORDER BY Id DESC";
con.Open();
SqlDataReader dr = com.ExecuteReader();
if (dr.Read())
{
a = Int32.Parse(dr[0].ToString());
}
con.Close();
}
catch
{
}
Reply
Answers (
4
)
Convert AutoResetEvent to TimerCallBack
My webpage does not load , parameters are expected