N/APosted on - 04/03/2012
How to establish data binding of .mdb file with .aspx page using visual basic as language in visual studio 2008?
Data binding of .mdb file with .aspx page.
Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.jet.oledb.4.0;data source=D:MyDBs.mbd") ' Connection string take in to the OleDbConnection type variable. con is the name of the variable used. Use your .mdb file name instead of MyDBs.mdb.
con.Open() 'This allows you to open(establish) the connection
'Between the open connection and the close connection you have to write all the codes and queries that related to database executions. After the connection close you have to re open the connection to execute the code segments related to database.
con.Close() 'Close the connection opened
'using catch block you can get if there are any errors while execution of the codes in try block with message box or any displaying items such as label