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
ahsan ashfaq
NA
14
0
odbc connection
Dec 4 2009 7:16 AM
public DataSet FillContact(string mcid)
{
DataSet ds = new DataSet();
OdbcDataAdapter da = new OdbcDataAdapter();
query = "Select formid,FIELDID,NOID,TEXT from contacts where formid='"+ mcid +"'";
OdbcCommand cmdc = new OdbcCommand(query);
using (OdbcConnection connc = new OdbcConnection(connstring))
{
cmdc.Connection = connc;
connc.Open();
da.SelectCommand = cmdc;
da.Fill(ds, "Contacts");
return ds;
}
}
this is the function i use to return dataset
now what i m preplexed about is
i am using odbc connection by
using
keyword
my 2 questions are
will
using
automatically close the connection when it's scoped out?(Query normally executed)
will
using
still automatically closes the connection when it encounters the problem in any of the code before
return ds;
Reply
Answers (
1
)
Which of the following are included in the advantages of Lambda Expressions over Anonymous methods?
how to refrsh datagridview in c#