The MySoft_Data test of ORM is successful. It should be very useful.
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 );
The connection to MYSQL is successful. The next step is to connect to Access. Note that the Mysql. dll version must be packaged with another version. 6.2.2.
The supported databases are comprehensive: mysql, access, and mssql are supported.
Mysql connection string:
"Server = localhost; user id = root; password =''; charset = utf8; database = hidrin_001 "// mysql database
"Provider = Microsoft. Jet. OleDb.4.0; Data Source =" + Directory. GetCurrentDirectory () + (@ "\ zhenjiangDBA. mdb"); // winformindicates that the Data warehouse is in the same Directory as the .exe file, and Access
"Provider = Microsoft. Jet. OleDb.4.0; Data Source =" + MapPath ("~ /App_Data/zhenjiangDBA. mdb "); // In ASP.net, MapPath is used to locate the database and Access
"Server = (local); Database = Northwind; Uid = sa; Pwd = sa;" // mssql