Low cost ecommerce web development India flash website design
You separate the parts of the connection string with semicolons. For example,
at the simplest level, you can use an Open Database Connectivity (ODBC)
Data Source Name (DSN), a user ID, and password to connect to your
database. A DSN already contains the provider, the database server, and the
database name, so you don't have to specify those again.
For example:
Dim Conn
Set Conn = Server.Create0bject(“ADODB.Connection")
Conn.Mode = adModeReadWrite
Conn.ConnectionString = “DSN=myDSN;UID=manas;PWD=manas;"
Unfortunately, that's not the best method. By default, ODBC DSNs use the
MSDASQL provider, but the JET OLEDB provider is faster and provides
more functionality. Use this type of connection string instead.
Dim Conn, ConnStr
ConnStr= "PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA SOURCE=" +
Server.MapPath(Path2DB)
Set Conn = Server.CreateObject(“ADODB.Connection")
Conn.Mode = adModeReadWrite
Conn.ConnectionString = ConnStr
The connection string contains the provider name, the name of the server (in
this case, and the path to the MDB file. We use the Server.MapPath function
to translate the virtual path to the actual path on the server’s disk.
For
example, a database at the location
http://www.manastungare.com/users.mdb
can actually be the file
E:\Web\Databases\users.mdb
Server.MapPath translates the first address to the second (which is what is
needed by the ADODB.Connection object.)
Freelance web designer ASP PHP ecommerce web development India