Ask a Question related to ASP Database, Design and Development.
-
John Davis #1
connect to the data source with or without Connection object
To connect the ASP application to data source, we can use ADO.Connection
object
Const connectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data
Source=C:\mydatabase.mdb;"
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
....
objConn.Open connectionString
objRS.Open sqlStatement, objConn '----------------- (1)
The alternative is we can open the connection directly with ADO.RecordSet
object, without using ADO.Connection object.
objRS.Open sqlStatement, connectionString '---------------(2)
What's the differences between line (1) and (2)? I read a book saying using
Connection object is expensive, but I don't got it since there is connection
anyway by using RecordSet object.
Please advice. Thanks
John
John Davis Guest
-
Data Source Connection Verification Fails
I have been trying for hours to get Cold Fusion admnistrator to accept my data souce. I am using SQL Server 2000 on my development computer. Databse... -
Connection to data source error
Hi, For the past week I am continually getting disconnected from my data source in cold fusion, and have to reconnect. But when I go to do that,... -
Data Source Connection Problems -- CF6 and CF7
We have doing development locally running CF6 on a local XP SP2 machine with the latest version of the MS MSDE server. When we installed CF6 last... -
DB Connection Error: Data source name not found
Hei, I am using Dreamweaver MX 6.1, XP SP2 and trying to connect to a MS Access db. I can open & preview the page & data correctly using IIS... -
ASP Data Source Connection Help
I am trying to create a connection in my ASP page to a SQL Server database. This is my code for the connection string: <%Option Explicit%> <%... -
John Davis #2
connect to the data source with or without Connection object
To connect the ASP application to data source, we can use ADO.Connection
object
Const connectionString = "Provider=Microsoft.Jet.OLEDB.3.51; Data
Source=C:\mydatabase.mdb;"
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
....
objConn.Open connectionString
objRS.Open sqlStatement, objConn '----------------- (1)
The alternative is we can open the connection directly with ADO.RecordSet
object, without using ADO.Connection object.
objRS.Open sqlStatement, connectionString '---------------(2)
What's the differences between line (1) and (2)? I read a book saying using
Connection object is expensive, but I don't got it since there is connection
anyway by using RecordSet object.
Please advice. Thanks
John
John Davis Guest



Reply With Quote

