This code shows you how to connect to a access database
Using System.Data.SqlClient;
////////////////////////
OleDbConnection objConn = new OldDbConnection("Provider=Microsoft.Jet.OleDb.4.0;Data Source=c:\\path\database.mdb");
OleDbCommand objCmd = new OleDbCommand("select * from employees",objConn);
objConn.Open();
OleDbReade objRdr = objCmd.ExecuteReader();
while(objRdr.Read())
{
Response.Write(objRdr["Name"] + "
");
}
objRdr.Close();
objConn.Close();
/////////////////////////
Monday, October 13, 2008
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment