Posted on: 1/27/2015 1:35:42 PM | Views : 625

Hello every one.
I want to which of the following ways in order to connecting to a database is better (faster and efficient)? And when to use each of the way, I will get a better result?
Using OleDbCommand repeatedly in a page with an opened database connection as like this:
Dim dbconn As OleDbConnection = New OleDbConnection("mssql connection string") dbcomm = New OleDbCommand("select command", dbconn) dbread = dbcomm.ExecuteReader() REPEATER.DataSource = dbread REPEATER.DataBind() REPEATER.Dispose() dbread.Close() or
Using OleDbDataAdapter repeatedly in a page like this:
Dim dbconn As OleDbConnection = New OleDbConnection("mssql connection string"), DBCommand As OleDbDataAdapter, myDS As New DataSet DBCommand = New OleDbDataAdapter("select command", dbconn) DBCommand. ...

Go to the complete details ...