Home > Software engineering >  Vb how to connect the mysql database
Vb how to connect the mysql database

Time:12-23

Vb how to connect the mysql database, we give an example

CodePudding user response:

The difference lies in the connection string, depending on your connection way,

A.O DBC
I.L ocal database:
"Driver={mySQL}; Server=mySrvName; Option=16834; The Database=mydatabase;"
II. Remote database:
"Driver={mySQL}; Server=data.domain.com; Port=3306; Option=131072; Stmt=; The Database=my - Database; Uid=username; The Pwd=";"

B.O LE DB, OleDbConnection
"The Provider=MySQLProv; Data Source=mydb; User Id=UserName; Password=asdasd;"

C. ySqlConnection (.net)
Appropriate precautions InfoDesigns. DbProvider:
"Data Source=server; The Database=mydb; User ID=username; Password=PWD; The Command Logging=false "
Note: this method is used only for the eInfoDesigns dbProvider connection,

CodePudding user response:

Using ADO controls

CodePudding user response:

reference 1st floor of123 response:
difference lies in the connection string, depending on your connection way,

A.O DBC
I.L ocal database:
"Driver={mySQL}; Server=mySrvName; Option=16834; The Database=mydatabase;"
II. Remote database:
"Driver={mySQL}; Server=data.domain.com; Port=3306; Option=131072; Stmt=; The Database=my - Database; Uid=username; The Pwd=";"

B.O LE DB, OleDbConnection
"The Provider=MySQLProv; Data Source=mydb; User Id=UserName; Password=asdasd;"

C. ySqlConnection (.net)
Appropriate precautions InfoDesigns. DbProvider:
"Data Source=server; The Database=mydb; User ID=username; Password=PWD; The Command Logging=false "
Note: this method is only used to by eInfoDesigns dbProvider connection,
method is A success, need to install the ODBC;
Method B, need to pack what -??? You don't succeed

CodePudding user response:

reference sunjs12345 reply: 3/f
Quote: refer to 1st floor of123 response:

The difference lies in the connection string, depending on your connection way,

A.O DBC
I.L ocal database:
"Driver={mySQL}; Server=mySrvName; Option=16834; The Database=mydatabase;"
II. Remote database:
"Driver={mySQL}; Server=data.domain.com; Port=3306; Option=131072; Stmt=; The Database=my - Database; Uid=username; The Pwd=";"

B.O LE DB, OleDbConnection
"The Provider=MySQLProv; Data Source=mydb; User Id=UserName; Password=asdasd;"

C. ySqlConnection (.net)
Appropriate precautions InfoDesigns. DbProvider:
"Data Source=server; The Database=mydb; User ID=username; Password=PWD; The Command Logging=false "
Note: this method is only used to by eInfoDesigns dbProvider connection,
method is A success, need to install the ODBC;
Method B, need to pack what -??? No success

The OLEDB driver
  • Related