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.Â
Try
{
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Â
}
Catch
{
'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Â
}
Â