[My ASP.NET Learning History] Database Operation (2)

xiaoxiao2021-03-06  50

private void Page_Load (object sender, System.EventArgs e) {string dbPath = @ "Data / dbTest.mdb"; string db = Server.MapPath (dbPath); string connectionString = "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = " DB; // string strsql =" select * from customers "; // string strsql =" Insert INTO CUSTOMERS (Customerid) VALUES (// String strsql = @ "Update Customers Set Customerid = 'PPPP', address = '64651546' where id = 11 "; // String strsql = @" delete from customers where id = 11 ";

OLEDBCONNECTION CONN = New OLEDBConnection; OLEDBCOMMAND CMD = New OLEDBCOMMAND (STRSQL, CONN);

CMD.Connection.open (); cmd.executeReader (); conn.close ();

}

转载请注明原文地址:https://www.9cbs.com/read-114481.html

New Post(0)