使用ACCESS数据库,连接字符串的配置
2009-02-14 22:21
369 查看
Example of ASP.Net 2.0 Access Database Connection String
<connectionStrings><add name="accessConnStr" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source= |DataDirectory|ajTravelDB.mdb" providerName="System.Data.OleDb"/>
</connectionStrings>
name attribute of connectionstrings add element contains the name as accessConStr for the connection string.
connectionString attribute contains the connection string format supported by Oledb drivers. |DataDirectory| is used in the above of connection string to connect the MS Access Database placed inside the App_Data directory. By Default |DataDirectory| maps the path of database file placed inside the default App_Data directory. After |DataDirectory| add up the name of MS Access Database filename as shown in above example.
providerName attribute contains the name of the Namespace of ASP.Net 2.0 that will provide the methods and functions for Data Access while coding.
相关文章推荐
- C#中配置文件的使用方法(连接字符串的保存)
- 使用PHP配置并连接access数据库
- 使用IP连接SQL SERVER或者配置为连接字符串失败
- 使用Hibernate连接h2数据库的配置文件写的方法(连接字符串)
- .Net配置文件中的数据库连接字符串使用
- 使用配置文件保存连接数据库的字符串的方法
- 关于在web.config中配置连接字符串及其使用
- 使用PHP配置并连接access数据库
- .Net配置文件中的数据库连接字符串使用
- 配置Access数据库连接字符串
- 使用配置文件保存数据库连接字符串
- .Net配置文件中的数据库连接字符串使用
- 使用配置文件读取连接字符串
- ASP.NET- 使用OLEDB导入Excel连接字符串的HDR=YES; IMEX=1详解
- 使用OLE DB连接各种类型的数据库的连接字符串
- ACCESS数据库字符串连接方式
- 在web配置文件中保存连接字符串
- vmware在桥接模式下配置centos7网络,并使用xshell连接虚拟主机(学习过程篇)
- 在ASP.NET项目中的web.config文件里配置数据库连接并在程序代码中获取连接字符串
- 学习ASP .NET MVC5官方教程总结(五)使用SQL Server LocalDB创建连接字符串