<% @ Page language = "c #" ContentType = "text / html" responseEncoding = "GB2312"%> <% @ import namespace = "system.data.oledb"%>
Void Page_Load () {string db_path = @ "data / db.mdb"; // Database path string db = server.mappath (db_path); string strsql = "select * from [admin]"; string connString = "provike = Microsoft .Jet.OLEDB.4.0; Data Source = " DB; OleDbConnection conn = new OleDbConnection (connString); // establish OleDbConnection object OleDbCommand cmd = new OleDbCommand (strSQL, conn); // establish OleDbCommand object OleDbDataReader dr; // build DataReader object cmd.connection.open (); // Open link DR = cmd.executeReader (); // Established DataReader While (Dr.Read ()) {response.write ("
" DR ["name"]. TOSTRING () " td> | " DR ["password"]. TOSTRING () " td> tr>");} Response.write " table>");
script>
转载请注明原文地址:https://www.9cbs.com/read-114503.html New Post(0)
|