Home >Database >Mysql Tutorial >ORM之MySoft_Data测试成功

ORM之MySoft_Data测试成功

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:57:031114browse

链接MYSQL成功, 下一步就是连接Access了。 注意的问题,需要Mysql.dll的版本一定要用他打包中的哦。6.2.2. 支持的数据库比较全面

ORM之MySoft_Data测试成功。应该是非常好用的。

Model.e_cate c = new Model.e_cate();
c.fid = 1;
c.name = "1";
c.tmpid = "2222";

DbSession session = new DbSession(new MySoft.Data.MySql.MySqlProvider("Server=localhost;user id=root;password='';charset=utf8;database=hidrin_001"));
session.InsertOrUpdate(c);

链接MYSQL成功, 下一步就是连接Access了。 注意的问题,,需要Mysql.dll的版本一定要用他打包中的哦。6.2.2.

支持的数据库比较全面: mysql,access ,mssql都支持。


mysql的连接字符串:

"Server=localhost;user id=root;password='';charset=utf8;database=hidrin_001"  //mysql数据库

"Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + Directory.GetCurrentDirectory()+(@"\zhenjiangDBA.mdb");  //winform用于指定数据库与.exe文件在同一目录下 ,Access

"Provider=Microsoft.Jet.OleDb.4.0;Data Source=" + MapPath("~/App_Data/zhenjiangDBA.mdb");  //在ASP.net中是用MapPath定位到数据库的位置,Access

"Server=(local);Database=Northwind;Uid=sa;Pwd=sa;" //mssql

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn