ASP script DNS-less connection with MSAccess97
Hi,
I tried and tried, but need some help. Could someone sent me a short but
complete ASP-script to make a working DNS-less connection with my 'test01.mdb'
with the fields name, adres and city. I used a found syntax with "Provider=Microsoft
...", but I do something wrong. Where does the system look to this provider?
On the Internet or does I have to download something.
How does it all exactly work?
Please help!
Ronald
[463 byte] By [
Ronald] at [2007-11-9 15:35:58]

# 1 Re: ASP script DNS-less connection with MSAccess97
go to www.aspfaq.com
or www.able-consulting.com
regards
John Timney (MVP)
Ronald <rlo@edu.a12.nl> wrote in message news:395ba552$1@news.dev-archive.com...
>
> Hi,
> I tried and tried, but need some help. Could someone sent me a short but
> complete ASP-script to make a working DNS-less connection with my
'test01.mdb'
> with the fields name, adres and city. I used a found syntax with
"Provider=Microsoft
> ...", but I do something wrong. Where does the system look to this
provider?
> On the Internet or does I have to download something.
> How does it all exactly work?
> Please help!
> Ronald
# 2 Re: ASP script DNS-less connection with MSAccess97
"John Timney (MVP)" <timneyj@btinternet.com> wrote:
>go to www.aspfaq.com
>or www.able-consulting.com
>
>regards
>
>John Timney (MVP)
>
>Ronald <rlo@edu.a12.nl> wrote in message news:395ba552$1@news.dev-archive.com...
>>
>> Hi,
>> I tried and tried, but need some help. Could someone sent me a short but
>> complete ASP-script to make a working DNS-less connection with my
>'test01.mdb'
>> with the fields name, adres and city. I used a found syntax with
>"Provider=Microsoft
>> ...", but I do something wrong. Where does the system look to this
>provider?
>> On the Internet or does I have to download something.
>> How does it all exactly work?
>> Please help!
>> Ronald
>
>
In you global.asa you can add these lines:
<SCRIPT LANGUAGE="VBScript" RUNAT="Server">
Sub Session_OnStart ' Runs the first time a user runs any page in your
application
'Create an ADO Connection
Set cn = Server.CreateObject("ADODB.Connection")
' Specify the OLE DB provider.
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
' Specify connection string on Open method.
' To run the sample, edit this line to reflect your server's name.
ProvStr = "Data Source=d:\path\test01.mdb;Persist Security Info=False"
cn.Open ProvStr
Set Session("cnn") = cn
END Sub
Sub Session_OnEnd ' Runs when a user's session times out or quits your
application
'Close the data connection
cn.Close
END Sub
</SCRIPT>
# 3 Re: ASP script DNS-less connection with MSAccess97
the code will be for DNS-less connection.
AbsolutePath = Server.MapPath ("\")
DBQValue = "DBQ=" & AbsolutePath & "\db\test01.mdb"
set conn = server.createobject("adodb.connection")
conn.open "DRIVER=Microsoft Access Driver (*.mdb);" & DBQValue
qry_classes = "Select * from classes"
set RS = conn.execute(qry_classes)
"Ronald" <rlo@edu.a12.nl> wrote:
>
>Hi,
>I tried and tried, but need some help. Could someone sent me a short but
>complete ASP-script to make a working DNS-less connection with my 'test01.mdb'
>with the fields name, adres and city. I used a found syntax with "Provider=Microsoft
>...", but I do something wrong. Where does the system look to this provider?
>On the Internet or does I have to download something.
>How does it all exactly work?
>Please help!
>Ronald
# 4 Re: ASP script DNS-less connection with MSAccess97
Try with this ::: change the mdb file name with your file name
in server.MAPPATH
strConnect = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("data.mdb")
& ";DefaultDir=" & Server.MapPath(".") & ";DriverId=25;FILE=MS Access;MaxBufferSize=512;PageTimeout=5"
--enjoy from india
enjoy at 2007-11-11 23:44:19 >
