0

votes

Vote

os-utilities in OS & Utilities Channel,
Written by: alliisha john on Mar 29 2012, 12:02am

DB connection strings : Essential to required with database server

Database servers are the computer programs that provides users with data base programs to be used on computers and programs. There are many Database management systems that are based on the client server model that make the use of database servers for communicating between different client and server program.

 

Database that are used for storing data and for storage purpose and it s acts as a back end from where clients can access data and perform front end applications after establishing connection between database server to the client and in this situation to Establishment the communication DB connection strings are required. DB connection strings are very important for establishing connection between database server and front end users so that the commands given by the users can be executed to give the desired result. So to able to use the database the database connection strings are required.

 

Database connection strings are the set of values that is provided by the users to access database. These are the drivers and the computer codes that are executed to establish the connection. When the connection to the data base servers is established with the help of data base connection strings clients or users can read , write or modify the data according to the permission provided.

 

Some of the examples of database connection strings that can be used for connection with the database are :

 

OLE DB Method for SQL

'code start

[%
set cnn = server.createobject("ADODB.Connection")
cnn.open "PROVIDER=SQLOLEDB;DATA SOURCE=sqlservername;UID=username;PWD=password;DATABASE=dbname.mdb "
%]

'code finish

DSN-Less connection for Access

'code start

[%
set cnn = server.createobject("ADODB.Connection")
cnn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:yourdatabase.mdb"
%]

'code finish

OLE DB Method for Access

'code start

[%
set cnn = server.createobject("ADODB.Connection")
cnn.open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=c:yourdatabase.mdb"
%]

'code finish

File DSN Connection Method for Access

'code start

[% set cnn = server.createobject("ADODB.Connection")
cnn.open "FILEDSN=AccessDSN"
%]

'code finish

 

 

Citizens Comments

Post your comment

default Avatar

You might be interested in these related contributions