|
 |
asp_databases thread: How do I use OLEDB to connect to a access db??
Message #1 by "Warren S. Wyght" <wswyght@t...> on Wed, 28 Jun 2000 21:24:25 -0600
|
|
Last night the server crashed and the network needed to be re-built, this
lost all the connections to the databases. I was told they did not use
DNS to make the connection nor did they use ADO, so I think they may have
used OLEDB.
Here is my question, do you know of a way to connect to a Access DataBase
over the web that is ASP compliant and uses OLEDB? I have read about this
being possible but have never found a way to do it.
The connection looked like this, there is no DNS= in it nor is there the
connectionstring line in this at all. What kind of connection is it and
what do I need on the server to make it work once more??
<%
Set objConn= Server.CreateObject("ADODB.Connection")
objConn.Open("global_pro") 'global_pro.mdb is the DB
'on an other server in the company but not the webserver there is a DNS with a 'glob_pro
DNS but no path to it that I ever saw.
Set objRS=Server.CreateObject("ADODB.Recordset")
select_veh="Select Data.* From Data" & _
" WHERE Data.[Who Sold To] LIKE('N%') order by Data.Date"
objRS.Open select_veh, objConn
%>
If you don't know of a way but know where I may find the info I need that would be great.
Warren S. Wyght
Message #2 by Chris Ullman <chrisu@w...> on Thu, 29 Jun 2000 12:28:09 +0100
|
|
The Jet 4.0 OLE Db Provider which comes with Access 2000?
Chris
-----Original Message-----
From: Warren S. Wyght [mailto:wswyght@t...]
Sent: Thursday, June 29, 2000 4:24 AM
To: ASP Databases
Subject: [asp_databases] How do I use OLEDB to connect to a access db??
Last night the server crashed and the network needed to be re-built, this
lost all the connections to the databases. I was told they did not use
DNS to make the connection nor did they use ADO, so I think they may have
used OLEDB.
Here is my question, do you know of a way to connect to a Access DataBase
over the web that is ASP compliant and uses OLEDB? I have read about this
being possible but have never found a way to do it.
The connection looked like this, there is no DNS= in it nor is there the
connectionstring line in this at all. What kind of connection is it and
what do I need on the server to make it work once more??
<%
Set objConn= Server.CreateObject("ADODB.Connection")
objConn.Open("global_pro") 'global_pro.mdb is the DB
'on an other server in the company but not the webserver there is a DNS with
a 'glob_pro
DNS but no path to it that I ever saw.
Set objRS=Server.CreateObject("ADODB.Recordset")
select_veh="Select Data.* From Data" & _
" WHERE Data.[Who Sold To] LIKE('N%') order by Data.Date"
objRS.Open select_veh, objConn
%>
If you don't know of a way but know where I may find the info I need that
would be great.
Warren S. Wyght
---
Wrox Professional Wireless Developer Conference, Amsterdam, July 10-12.
Covering application of WAP, XML, ASP, Java and C++ to wireless computing,
choose from 40+ technical sessions delivered by industry experts:
http://www.wroxconferences.com/ConferenceHome.asp?ConfID=9
---
You are currently subscribed to asp_databases
Message #3 by Chris Ullman <chrisu@w...> on Thu, 29 Jun 2000 12:40:42 +0100
|
|
To elaborate, as I recommend in my book (plug, plug), create a UDL file
(create a blank text document and change it to have .udl suffix. Then choose
the Jet 4.0 OLE DB Provider and connect it to the database of your choice.
Check the test connection is working and then open the udl file and use the
text that has been automatically generated as a connection string.
Chris
-----Original Message-----
From: Chris Ullman [mailto:chrisu@w...]
Sent: Thursday, June 29, 2000 12:28 PM
To: ASP Databases
Subject: [asp_databases] RE: How do I use OLEDB to connect to a access
db? ?
The Jet 4.0 OLE Db Provider which comes with Access 2000?
Chris
-----Original Message-----
From: Warren S. Wyght [mailto:wswyght@t...]
Sent: Thursday, June 29, 2000 4:24 AM
To: ASP Databases
Subject: [asp_databases] How do I use OLEDB to connect to a access db??
Last night the server crashed and the network needed to be re-built, this
lost all the connections to the databases. I was told they did not use
DNS to make the connection nor did they use ADO, so I think they may have
used OLEDB.
Here is my question, do you know of a way to connect to a Access DataBase
over the web that is ASP compliant and uses OLEDB? I have read about this
being possible but have never found a way to do it.
The connection looked like this, there is no DNS= in it nor is there the
connectionstring line in this at all. What kind of connection is it and
what do I need on the server to make it work once more??
<%
Set objConn= Server.CreateObject("ADODB.Connection")
objConn.Open("global_pro") 'global_pro.mdb is the DB
'on an other server in the company but not the webserver there is a DNS with
a 'glob_pro
DNS but no path to it that I ever saw.
Set objRS=Server.CreateObject("ADODB.Recordset")
select_veh="Select Data.* From Data" & _
" WHERE Data.[Who Sold To] LIKE('N%') order by Data.Date"
objRS.Open select_veh, objConn
%>
If you don't know of a way but know where I may find the info I need that
would be great.
Warren S. Wyght
---
Wrox Professional Wireless Developer Conference, Amsterdam, July 10-12.
Covering application of WAP, XML, ASP, Java and C++ to wireless computing,
choose from 40+ technical sessions delivered by industry experts:
http://www.wroxconferences.com/ConferenceHome.asp?ConfID=9
---
You are currently subscribed to asp_databases
---
Wrox Professional Wireless Developer Conference, Amsterdam, July 10-12.
Covering application of WAP, XML, ASP, Java and C++ to wireless computing,
choose from 40+ technical sessions delivered by industry experts:
http://www.wroxconferences.com/ConferenceHome.asp?ConfID=9
---
You are currently subscribed to asp_databases
Message #4 by smartin@c... on Thu, 29 Jun 2000 10:38:16 -0400
|
|
Given the code you posted, they were using a System DSN (not DNS) and ODBC.
If you are using a DSN, you don't need to include the full path info (like
"DSN=global_pro;UIS=blah;pw=bla"). You can just say objConn.open "DSN
Name".
-Stephen
> -----Original Message-----
> From: Warren S. Wyght
> Sent: Wednesday, June 28, 2000 11:24 PM
> To: ASP Databases
> Subject: [asp_databases] How do I use OLEDB to connect to a
> access db??
>
>
> Last night the server crashed and the network needed to be
> re-built, this
> lost all the connections to the databases. I was told they
> did not use
> DNS to make the connection nor did they use ADO, so I think
> they may have
> used OLEDB.
>
> Here is my question, do you know of a way to connect to a
> Access DataBase
> over the web that is ASP compliant and uses OLEDB? I have
> read about this
> being possible but have never found a way to do it.
>
> The connection looked like this, there is no DNS= in it nor
> is there the
> connectionstring line in this at all. What kind of connection
> is it and
> what do I need on the server to make it work once more??
>
>
> <%
>
> Set objConn= Server.CreateObject("ADODB.Connection")
> objConn.Open("global_pro") 'global_pro.mdb is the DB
> 'on an other server in the company but not the webserver
> there is a DNS with a 'glob_pro
> DNS but no path to it that I ever saw.
> Set objRS=Server.CreateObject("ADODB.Recordset")
> select_veh="Select Data.* From Data" & _
> " WHERE Data.[Who Sold To] LIKE('N%') order by Data.Date"
> objRS.Open select_veh, objConn
>
> %>
>
> If you don't know of a way but know where I may find the info
> I need that would be great.
>
>
> Warren S. Wyght
>
|
|
 |