asp.net 连接数据库文件 dbf
来源:互联网 发布:js滑动效果 编辑:程序博客网 时间:2024/04/29 14:06
asp.net 可以直接连接数据库 文件,如下 :
// resolve the address to the Access database
string fileNameString = this.MapPath(".");
fileNameString += "..\\..\\..\\..\\data\\chartdata.mdb";
// initialize a connection string
string myConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileNameString;
// define the database query
string mySelectQuery="SELECT Name, Sales FROM REPS WHERE RegionID < 3;";
// create a database connection object using the connection string
OleDbConnection myConnection = new OleDbConnection(myConnectionString);
// create a database command on the connection using query
OleDbCommand myCommand = new OleDbCommand(mySelectQuery, myConnection);
// open the connection
myCommand.Connection.Open();
// create a database reader
OleDbDataReader myReader = myCommand.ExecuteReader(CommandBehavior.CloseConnection);
// since the reader implements and IEnumerable, pass the reader directly into
// the DataBind method with the name of the Column selected in the query
- asp.net 连接数据库文件 dbf
- asp连接dbf数据库技术
- l.net 连接dbf
- .net连接DBF文件
- c#操作DBF数据库文件
- c#操作DBF数据库文件
- C# 操作本地dbf数据库文件
- ASP.NET中禁止下载Access数据库文件
- asp.net 中 mdf 数据库文件的使用
- asp.net中将数据导出为dbf文件
- dbf数据导入sql server数据库(asp.net C#)
- 连接数据库文件
- C#操作VFP的dbf数据库文件实例
- C#导出Visual FoxPro(.dbf)数据库文件
- 给新建的ASP.NET网站添加数据库文件出错!
- asp.net执行sql脚本,导出数据库文件到本地
- Firebird Data Provider For .NET 连接 Firebird 数据库文件
- dbf 连接字符串问题
- Oracle Scheduler(二)——Jobs(调用shell脚本)!
- 基于mips架构的uboot启动流程(3)
- Windows下安装Memcache 使用memcached for Win32
- struts2 标签的使用之二 s:iterator
- android中/system/多了一个yahoo文件夹
- asp.net 连接数据库文件 dbf
- ubuntu 10.04 编译安装最新版本linux-2.6.34内核
- Android 数据存储【Network】
- java线程调用两次start()报错源码
- Expert C Programming 总结(四)
- HACMP的网络环境(boot IP,service IP,永久IP)
- 利用iText生成word文档例子参考
- vector成員賦值,順序輸出
- 如何进行产品规划