Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Answers
How to find connection status ? in DATASET
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
SUNIL GUTTA
11y
1.3k
1
Reply
Hi
Well all know dataSet works in disconnected architecture . So internally it opens connection & closes right .. so i want to know when it will open & close connection i tried like below ??
OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\users\\sunil\\my documents\\empdatabase.accdb;Persist Security Info=False");
OleDbDataAdapter da = new OleDbDataAdapter("Select * from customer ", con);
DataSet ds = new DataSet();
da.Fill(ds,"sunil");
dataGridView1.DataSource = ds.Tables[0];
I kept messagebox.show(con.state.Tostring()); one every line to know when it is open but i am getting always its is closed ..
Any suggestions
Cheers & thanks
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Chart background Image
Data reader with gridview ?