Data binding of .mdb file with .aspx page.

Asked By 20 points N/A Posted on -
qa-featured

How to establish data binding of .mdb file with .aspx page using visual basic as language in visual studio 2008?

SHARE
Answered By 0 points N/A #195429

Data binding of .mdb file with .aspx page.

qa-featured

 

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 
}
 

Related Questions