p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: DSNLess, DSn, adodb.connection and others


Message #1 by "wrox_newsgroup" <yls177@h...> on Tue, 4 Jul 2000 23:25:23 +0800
Hi,



I have a thin understanding of the various methods used in the database

system.

Things such as dsnless, dsn, and the statement

sever.createobject(adodb.connection). The connection can be changed to like

recordset, and others like ADO.  Believe that i will have a better journey

to the destination if i have a clearer picture of whats going on?



Thanx





Message #2 by "Ken Schaefer" <ken.s@a...> on Wed, 5 Jul 2000 11:19:21 +1000
When you want to access datastores (eg databases, but also text files, excel

spreadsheets etc) from ASP you normally use a component provided by

Microsoft called Active X Data Objects (or ADO for short).



ADO allows the instatiation of three basic objects - connection, command and

recordset (hence Server.CreateObject("ADODB.Connection"), ("ADODB.Command")

and ("ADODB.Recordset"))



However ADO is just a thin wrapper that sits on top of another technology

called OLEDB. Microsoft provided ADO because programming for OLEDB is far

more complicated than using ADO. Basically ADO hides the complexity of

OLEDB.



When you use a normal OLEDB provider, the request for data from the database

goes something like this (eg for MS Access):



ASP -> ADO -> OLEDB Provider for Access -> Access



In order for the OLEDB Provider to know which database to connect to, you

use an OLEDB connection string

(http://www.adOpenStatic.com/FAQ/OLEDBConnection.asp)



There is also an OLEDB Provider for ODBC drivers:



ASP -> ADO -> OLEDB Provider For ODBC Drivers -> ODBC Manager -> ODBC Driver

for Access -> Access



In order for the ODBC Driver to know which database to open you either need

to supply a DSN name (eg a system DSN, which is just something in the

registry that ODBC can look up to find the physical location of the .mdb

file), or you use a DSN-less ODBC connection which specifies the physical

location of the Access database.



I hope this helps.



Cheers

Ken









----- Original Message -----

From: "wrox_newsgroup" 

Newsgroups: asp_databases

To: "ASP Databases" <asp_databases@p...>

Sent: Wednesday, July 05, 2000 1:25 AM

Subject: [asp_databases] DSNLess, DSn, adodb.connection and others





> Hi,

>

> I have a thin understanding of the various methods used in the database

> system.

> Things such as dsnless, dsn, and the statement

> sever.createobject(adodb.connection). The connection can be changed to

like

> recordset, and others like ADO.  Believe that i will have a better journey

> to the destination if i have a clearer picture of whats going on?

>

> Thanx

>

>


  Return to Index