02 เมษายน 2557

ใช้ Database ตัวใหนดี (VB.NET)


'Imports System.Data.Odbc
'Provider มําตรฐานใน ADO.NET ส ําหรับ.NET Framework 2.0 ใน .NET Framework 2.0
'Imports System.Data.SqlClient     'Microsoft SQL Server 7.0 ขึ้นไป
'Imports System.Data.OracleClient  'Oracle 8.1.6 ขึ้นไป
'Imports System.Data.SqlXml        'SqlXml ใน SQL Server
'Imports System.Data.Odbc          'ODBC DataSource
'Imports System.Data.OleDb         'OleDb

'------------------------------------------------------------------------------
'MySQL Connction String

'Standard
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

'Specifying port
'Server=myServerAddress;Port=1234;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

'Named pipes
'Server=myServerAddress;Port=-1;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

'Multiple servers
'Server=serverAddress1 & serverAddress2 & etc..;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

'Using encryption
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encryption=true;

'Using encryption, alternative
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Encrypt=true;

'Specifying default command timeout
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;default command timeout=20;

'Specifying connection attempt timeout
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Connection Timeout=5;

'Inactivating prepared statements
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Ignore Prepare=true;

'Specifying port
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Port=3306;

'Specifying network protocol
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; Protocol=socket;

'Specifying character set
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword; CharSet=" & MySqlCharSet & ";

'Specifying shared memory name
'Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;Shared Memory Name=MYSQL;


'Imports System.Data
'Imports System.Data.SqlClient

Imports System.Data.Odbc

ไม่มีความคิดเห็น: