What is DB Connection String?
DB Connection String is a special type of string
which provide the information about the data source
i.e. database and the means which is going to
connect with it. The connecting means can be any
front-end application written in any computer
language and the database source is known as
back-end application. The establiched connection
between both the application managed by underlying
driver. This driver works as bridge between the
applications and the data sharing and trasaction
continues through out the process. The DB
Connection string is based on SQL(Structured Query
Language).
SQL Server DB Connection String
SQL ODBC connection strings
Standard Security:
"Driver={SQLServer};Server=Server=DBName;Uid=
User;Pwd=Password;"
Trusted connection:
"Driver={SQLServer};Server=Server;Database=DBN
ame;Trusted_Connection=yes;"
SQL Server DB Connection String
SQL OleDbConnection .NET strings
Standard Security:
"Provider=SQLOLEDB;Data Source=Server;Initial
Catalog=DBName;UserId=User;Password=Passwo
rd;"
Trusted connection:
"Provider=SQLOLEDB;Data Source=Server;Initial
Catalog=DBName;Integrated Security=SSPI;"
Oracle DB Connection String
Data Source
hr = CoCreateInstance(CLSID_OraOLEDB, NULL,
CLSCTX_INPROC_SERVER,
IID_IDBInitialize,
(void**)&pIDBInitialize);
Connecting to an Oracle Database
"Provider=OraOLEDB.Oracle;User
ID=user;Password=pwd;Data Source=constr;"
Oracle DB Connection String
Password Expiration(Connect using connectionstring)
Dim con As New ADODB.Connection
con.ConnectionString =
"Provider=OraOLEDB.Oracle;Data
Source=MyOraDb;" & _
"User ID=scott;Password=tiger;"
con.Open
MySQL DB Connection String
Open connection to local MySQL database
using MySQL ODBC 3.51 Driver
"Provider=MSDASQL; DRIVER={MySQL
ODBC 3.51Driver}; SERVER= localhost;
DATABASE=DBName; UID=User;
PASSWORD=Password; OPTION=3"
Common Errors to DB
Connection String
Common Errors of Oracle:
ORA-03113: TNS:end-of-file on communication
channel
ORA-12154: TNS:could not resolve service name
ORA-03121: no interface driver connection -
function not performed
ORA-12170: TNS:Connect timeout occurred
Thank You
Please Visit
http://www.dbconnectionstrings.org