在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
ASP.NET+C#读取ACCESS数据库的简单方法之一。代码如下:
string strDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("Database/TeamPro.mdb");
string strSQL = "SELECT * FROM Project where id=" + Convert.ToInt32(Request.QueryString["Project_ID"]) ; // create Objects of ADOConnection and ADOCommand OleDbConnection myConn = new OleDbConnection(strDSN); OleDbCommand myCmd = new OleDbCommand( strSQL, myConn ); OleDbDataReader datareader = null; try |
请发表评论