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
Arun Kuamr
NA
70
3.2k
odbc connectivity
Apr 14 2016 7:58 AM
Hi All,
I went through code of a project and i observe that a odbc adapter fill dataset sucessfully but connection is closed or only connection string provided.
I am confuse how it work , I think connection should be open other wise exception should be throw.
Kindly clear my confusion.
Below are the code: -
Dim dbconn As Odbc.OdbcConnection
dbconn = New Odbc.OdbcConnection(connectionstring)
If dbconn.State <> ConnectionState.Open Then
dbconn.Open()
End If
dbconn.Close()
Dim dbAdapter As Odbc.OdbcDataAdapter
dbAdapter = New Odbc.OdbcDataAdapter("select * from studdent where id=5", dbconn)
Dim ds As New DataSet
dbAdapter.Fill(ds)
Reply
Answers (
6
)
LINQ Queries
save