The MySoft_Data test of ORM is successful.

Source: Internet
Author: User
Tags mysql connection string

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.