对数据库里数据的读入

时间:2015-08-10 03:56:19
【文件属性】:
文件名称:对数据库里数据的读入
文件大小:4KB
文件格式:TXT
更新时间:2015-08-10 03:56:19
写入数据库 如何让数据读入、读出数据库。 } //写入数据库 string strdatasource = null; string strconnection = null; strdatasource = Application.StartupPath + @"\..\datasource\tree.mdb"; strconnection="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +strdatasource; using (OleDbConnection thisconnection = new OleDbConnection(strconnection)) { //打开连接 thisconnection.Open(); //SQL命令 OleDbCommand thiscommand = thisconnection.CreateCommand(); //创建插入命令

网友评论

  • 不太会使用