search
Homephp教程php手册MySQL和.Net2.0配合使用

MySQL和.Net2.0配合使用

Jun 13, 2016 am 10:06 AM
mysqluseanditnew versionyesmostnowCooperate

MySql现在的最新版本是5.x.第一次接触它是在大二的时候,用php,那时好像还是4.x版本。
Mysql5增加很多新的功能,开始支持:存储过程、触发器、视图、信息架构视图等...
MySql在安装时一如既往的比较复杂,往往就是一个失败的提示,没有什么其它提示原因。
这是一篇文章,比较MySql和SqlServer的,http://htm.winsteps.net/database/331.htm
MySql中文网站http://www.mysql.cn/上资料很少,大多是些安装帮助。
要查资料还是去MySql的网站http://www.mysql.com/。
MySql现在有提供的各种连接工具(http://dev.mysql.com/downloads/connector/),.net下可以用的有Connector/ODBC和Connector/Net。
ODBC连接效率可能稍低,最好还是用Net直接的连接
这篇文章介绍了各种连接方法http://www.mysql.com/news-and-events/press-release/release_2002_10.html
1:ODBC连接
现在的版本是3.51,安装之后,可以这样操作:
// string conStr = "DRIVER = {MySQL ODBC 3.51 Driver}; SERVER = localhost; DATABASE =test; UID = root; PASSWORD=;";
//string conStr = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=test;USER=root;PASSWORD=;OPTION=3;";
string conStr = "provider = MySQL ODBC 3.51 Driver; SERVER = localhost; DATABASE =test; UID = root; PASSWORD=;";
try
{
OleDbConnection connection = new OleDbConnection(conStr);
connection.Open();
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
2:Net连接:
MySQL Connector Net 1.0.7:有net1.0;net.1;net2.0;mono1.0四个版本的connector。免费
CoreLab.MySql 3.5:这是个商业的版本,试用期30天。
下边的代码是使用MySQL Connector Net 的例子。注意:他的Parameter的前缀是“?”而不是“@”。这个问题比较特殊。CoreLab里面的Parameter的前缀就是“@”.

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.