|
 |
access_asp thread: Database connection problem
Message #1 by "Rakesh Patel" <rax_uk@h...> on Tue, 26 Feb 2002 12:09:52
|
|
i can connect to the database on my home machine, but i am having problems
connecting once ive uploaded the files onto a server. The only change i
made was to the data source location. ive changed it to the following:
http://clients.magmed.co.uk/rtest/NTU.mdb;" This is the new location of
the databse. what am i doing wrong??
could someone please help
Thanks
(this is the original code)
<%
Dim strDatabaseType
'Choose one of the following two lines, and comment out the other
strDatabaseType = "Access"
'strDatabaseType = "MSDE"
'Now we use this selection to specify the connection string
If strDatabaseType = "Access" Then
strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Inetpub\wwwroot\NTU.mdb;" & _
"Persist Security Info=False"
Else
strConnect = "Provider=SQLOLEDB;Persist Security Info=False;" & _
"User ID=sa;Initial Catalog=Movie;" & _
"Initial File Name=C:\Inetpub\wwwroot\NTU.mdf"
End If
%>
Message #2 by "Zee Computer Consulting" <zee@t...> on Tue, 26 Feb 2002 10:47:28 -0800
|
|
You can't connect that way -- you can't use HTTP to directly access your
database. You need to get the "true path" to the location of your MDB
database. Your ISP or system administrator should be able to provide you
with that information.
-- Zee
----- Original Message -----
From: "Rakesh Patel" <rax_uk@h...>
To: "Access ASP" <access_asp@p...>
Sent: Tuesday, February 26, 2002 12:09 PM
Subject: [access_asp] Database connection problem
> i can connect to the database on my home machine, but i am having problems
> connecting once ive uploaded the files onto a server. The only change i
> made was to the data source location. ive changed it to the following:
>
> http://clients.magmed.co.uk/rtest/NTU.mdb;" This is the new location of
> the databse. what am i doing wrong??
>
> could someone please help
>
> Thanks
>
> (this is the original code)
>
> <%
> Dim strDatabaseType
>
> 'Choose one of the following two lines, and comment out the other
> strDatabaseType = "Access"
> 'strDatabaseType = "MSDE"
>
> 'Now we use this selection to specify the connection string
> If strDatabaseType = "Access" Then
> strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=C:\Inetpub\wwwroot\NTU.mdb;" & _
> "Persist Security Info=False"
> Else
> strConnect = "Provider=SQLOLEDB;Persist Security Info=False;" & _
> "User ID=sa;Initial Catalog=Movie;" & _
> "Initial File Name=C:\Inetpub\wwwroot\NTU.mdf"
> End If
> %>
$subst('Email.Unsub').
>
Message #3 by Abdul Sami <abdul_sami_20@y...> on Tue, 26 Feb 2002 11:05:44 -0800 (PST)
|
|
You should use:
1: strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=NTU.mdb;" &
"Persist Security Info=False"
if the database is in the root directory
2: strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=/database/NTU.mdb;" &
"Persist Security Info=False"
if the database is in the database or some other directory in the
root directory.
--- Zee Computer Consulting <zee@t...> wrote:
> You can't connect that way -- you can't use HTTP to directly
> access your
> database. You need to get the "true path" to the location of
> your MDB
> database. Your ISP or system administrator should be able to
> provide you
> with that information.
>
> -- Zee
>
>
> ----- Original Message -----
> From: "Rakesh Patel" <rax_uk@h...>
> To: "Access ASP" <access_asp@p...>
> Sent: Tuesday, February 26, 2002 12:09 PM
> Subject: [access_asp] Database connection problem
>
>
> > i can connect to the database on my home machine, but i am
> having problems
> > connecting once ive uploaded the files onto a server. The
> only change i
> > made was to the data source location. ive changed it to the
> following:
> >
> > http://clients.magmed.co.uk/rtest/NTU.mdb;" This is the new
> location of
> > the databse. what am i doing wrong??
> >
> > could someone please help
> >
> > Thanks
> >
> > (this is the original code)
> >
> > <%
> > Dim strDatabaseType
> >
> > 'Choose one of the following two lines, and comment out the
> other
> > strDatabaseType = "Access"
> > 'strDatabaseType = "MSDE"
> >
> > 'Now we use this selection to specify the connection string
> > If strDatabaseType = "Access" Then
> > strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> > "Data Source=C:\Inetpub\wwwroot\NTU.mdb;" &
> _
> > "Persist Security Info=False"
> > Else
> > strConnect = "Provider=SQLOLEDB;Persist Security
> Info=False;" & _
> > "User ID=sa;Initial Catalog=Movie;" & _
> > "Initial File
> Name=C:\Inetpub\wwwroot\NTU.mdf"
> > End If
> > %>
> > ---
> > Change your mail options at http://p2p.wrox.com/manager.asp
> or
> $subst('Email.Unsub').
> >
>
>
$subst('Email.Unsub').
=====
Abdul Sami
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com
Message #4 by "Rakesh Patel" <rax_uk@h...> on Tue, 26 Feb 2002 21:38:15
|
|
Thanks for the help. I really appreciate it.
> You should use:
>
> 1: strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=NTU.mdb;" &
> "Persist Security Info=False"
> if the database is in the root directory
>
>
> 2: strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> "Data Source=/database/NTU.mdb;" &
> "Persist Security Info=False"
>
>
> if the database is in the database or some other directory in the
> root directory.
>
>
> --- Zee Computer Consulting <zee@t...> wrote:
> > You can't connect that way -- you can't use HTTP to directly
> > access your
> > database. You need to get the "true path" to the location of
> > your MDB
> > database. Your ISP or system administrator should be able to
> > provide you
> > with that information.
> >
> > -- Zee
> >
> >
> > ----- Original Message -----
> > From: "Rakesh Patel" <rax_uk@h...>
> > To: "Access ASP" <access_asp@p...>
> > Sent: Tuesday, February 26, 2002 12:09 PM
> > Subject: [access_asp] Database connection problem
> >
> >
> > > i can connect to the database on my home machine, but i am
> > having problems
> > > connecting once ive uploaded the files onto a server. The
> > only change i
> > > made was to the data source location. ive changed it to the
> > following:
> > >
> > > http://clients.magmed.co.uk/rtest/NTU.mdb;" This is the new
> > location of
> > > the databse. what am i doing wrong??
> > >
> > > could someone please help
> > >
> > > Thanks
> > >
> > > (this is the original code)
> > >
> > > <%
> > > Dim strDatabaseType
> > >
> > > 'Choose one of the following two lines, and comment out the
> > other
> > > strDatabaseType = "Access"
> > > 'strDatabaseType = "MSDE"
> > >
> > > 'Now we use this selection to specify the connection string
> > > If strDatabaseType = "Access" Then
> > > strConnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
> > > "Data Source=C:\Inetpub\wwwroot\NTU.mdb;" &
> > _
> > > "Persist Security Info=False"
> > > Else
> > > strConnect = "Provider=SQLOLEDB;Persist Security
> > Info=False;" & _
> > > "User ID=sa;Initial Catalog=Movie;" & _
> > > "Initial File
> > Name=C:\Inetpub\wwwroot\NTU.mdf"
> > > End If
> > > %>
> > > ---
> > > Change your mail options at http://p2p.wrox.com/manager.asp
> > or
> > $subst('Email.Unsub').
> > >
> >
> >
> $subst('Email.Unsub').
>
>
> =====
> Abdul Sami
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
|
|
 |