SQL Server | ODBC | Standard Security: | "Driver={SQL Server};Server=Aron1;Database=pubs;Uid=sa;Pwd=asdasd;" |
Trusted connection: | "Driver={SQL Server};Server=Aron1;Database=pubs;Trusted_Connection=yes;" | ||
Prompt for username and password: | oConn.Properties("Prompt") = adPromptAlways | ||
oConn.Open "Driver={SQL Server};Server=Aron1;DataBase=pubs;" | |||
OLE DB, OleDbConnection (.NET) | Standard Security: | "Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;" | |
Trusted connection: | "Provider=sqloledb;Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;" | ||
Prompt for username and password: | oConn.Provider = "sqloledb" | ||
oConn.Properties("Prompt") = adPromptAlways | |||
oConn.Open "Data Source=Aron1;Initial Catalog=pubs;" | |||
SqlConnection (.NET) | Standard Security: | "Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;" | |
Trusted connection: | "Data Source=Aron1;Initial Catalog=pubs;Integrated Security=SSPI;" | ||
Access | ODBC | Standard Security: | "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Uid=Admin;Pwd=;" |
Workgroup: | "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;SystemDB=C:\mydatabase.mdw;","admin", "" | ||
Exclusive: | "Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;Exclusive=1;Uid=admin;Pwd=" | ||
OLE DB, OleDbConnection (.NET) | Standard Security: | "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=asdasd;" | |
Trusted connection: | "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:System Database=system.mdw;","admin", "" | ||
Prompt for username and password: | "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;","admin", "" | ||
Oracle | ODBC | New version: | "Driver={Microsoft ODBC for Oracle};Server=OracleServer.world;Uid=Username;Pwd=asdasd;" |
Old version: | "Driver={Microsoft ODBC Driver for Oracle};ConnectString=OracleServer.world;Uid=myUsername;Pwd=myPassword;" | ||
OLE DB, OleDbConnection (.NET) | Standard security: | "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=Username;Password=asdasd;" | |
Trusted Connection: | "Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;" | ||
OracleConnection (.NET) | Standard: | "Data Source=Oracle8i;Integrated Security=yes"; | |
MySQL | ODBC | Local database: | "Driver={mySQL};Server=mySrvName;Option=16834;Database=mydatabase;" |
Remote database: | "Driver={mySQL};Server=data.domain.com;Port=3306;Option=131072;Stmt=;Database=my-database;Uid=username;Pwd=password;" | ||
OLE DB, OleDbConnection (.NET) | Standard: | "Provider=MySQLProv;Data Source=mydb;User Id=UserName;Password=asdasd;" | |
MySqlConnection (.NET) | eInfoDesigns.dbProvider: | "Data Source=server;Database=mydb;User ID=username;Password=pwd;Command Logging=false" | |
DSN | ODBC | DSN: | "DSN=myDsn;Uid=username;Pwd=;" |
File DSN: | "FILEDSN=c:\myData.dsn;Uid=username;Pwd=;" | ||
Excel | ODBC | Standard: | "Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=C:\MyExcel.xls;DefaultDir=c:\mypath;" |
OLE DB | Standard: | "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties=""Excel 8.0;HDR=Yes;IMEX=1""" | |
Text | ODBC | Standard: | "Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=c:\txtFilesFolder\;Extensions=asc,csv,tab,txt;" |
OLE DB | Standard: | "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\txtFilesFolder\;Extended Properties=""text;HDR=Yes;FMT=Delimited""" |
วันเสาร์ที่ 20 ตุลาคม พ.ศ. 2555
รวบรวม Script ที่ใช้ในการติดต่อ Database แบบต่างๆ
ป้ายกำกับ:
Database
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น