Discussion:
ASP Access Database connection
(too old to reply)
Chuck «BeyondFusion»
2006-11-16 19:55:20 UTC
Permalink
Your host may not support DSNless connections.

You need to check with them and see what they support.
--
Chuck Joslin
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com

Register domain names at www.awavedomains.com
Hi
Can anyone give me a custom string for a dsn-less connection to an Access database on an asp server. I can connect to
a db on my local drive through DSN but I can't use DSN on my webserver. All the examples I've tried come up with
JScript errors when published. This is driving me nuts.
Many thanks
Isabel
isabel
2006-11-16 20:08:27 UTC
Permalink
Hi Chuck

They do support dsn-less. They have a downloadable script here
http://www.lcn.biz/help/asp1.txt

Thanks

Isabel
Post by Chuck «BeyondFusion»
Your host may not support DSNless connections.
You need to check with them and see what they support.
--
Chuck Joslin
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com
Register domain names at www.awavedomains.com
Hi
Can anyone give me a custom string for a dsn-less connection to an Access
database on an asp server. I can connect to a db on my local drive
through DSN but I can't use DSN on my webserver. All the examples I've
tried come up with JScript errors when published. This is driving me
nuts.
Many thanks
Isabel
Chuck «BeyondFusion»
2006-11-16 20:15:01 UTC
Permalink
Isabel,

I imagine you'd only use the connection string portion of that script.

I'm assuming you're using the ASP flavor of the Fusion DB component.

Perhaps an ASP guru will weigh in.

As you know, I'm a PHP guy, myself.
--
Chuck Joslin
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com

Register domain names at www.awavedomains.com
Post by isabel
Hi Chuck
They do support dsn-less. They have a downloadable script here http://www.lcn.biz/help/asp1.txt
Thanks
Isabel
Post by Chuck «BeyondFusion»
Your host may not support DSNless connections.
You need to check with them and see what they support.
--
Chuck Joslin
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com
Register domain names at www.awavedomains.com
Hi
Can anyone give me a custom string for a dsn-less connection to an Access database on an asp server. I can connect
to a db on my local drive through DSN but I can't use DSN on my webserver. All the examples I've tried come up with
JScript errors when published. This is driving me nuts.
Many thanks
Isabel
isabel
2006-11-16 20:22:35 UTC
Permalink
That's correct Chuck. The Fusion ASP flavour would be much sweeter if I
could make it work! I've tried lots of variations cut from this script but
to no avail. I've looked all over trying to find a bit of script that will
work in the custom string line to get a connection. Strangely enough, I
couldn't make the RSS feed work with ASP on another page of the site but it
works perfectly with PHP.

Isabel
Post by Chuck «BeyondFusion»
Isabel,
I imagine you'd only use the connection string portion of that script.
I'm assuming you're using the ASP flavor of the Fusion DB component.
Perhaps an ASP guru will weigh in.
As you know, I'm a PHP guy, myself.
--
Chuck Joslin
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com
Register domain names at www.awavedomains.com
Post by isabel
Hi Chuck
They do support dsn-less. They have a downloadable script here
http://www.lcn.biz/help/asp1.txt
Thanks
Isabel
Post by Chuck «BeyondFusion»
Your host may not support DSNless connections.
You need to check with them and see what they support.
--
Chuck Joslin
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com
Register domain names at www.awavedomains.com
Hi
Can anyone give me a custom string for a dsn-less connection to an
Access database on an asp server. I can connect to a db on my local
drive through DSN but I can't use DSN on my webserver. All the
examples I've tried come up with JScript errors when published. This
is driving me nuts.
Many thanks
Isabel
Mike K
2006-11-16 21:21:30 UTC
Permalink
The asp components are written in Jscript
which is not the preferred flavor of language
for ASP.. many use it but most opt for VBScript
as that has been the most widely used language
since asp's conception.

If you use the components you will most likely have to
edit the generated source to do what you want.

Having said that, if you can edit the source you'd be
better off in the long run, forgetting the components and
using ctrl+t to write your own code.
Post by isabel
That's correct Chuck. The Fusion ASP flavour would be much sweeter if I
could make it work! I've tried lots of variations cut from this script but
to no avail. I've looked all over trying to find a bit of script that will
work in the custom string line to get a connection. Strangely enough, I
couldn't make the RSS feed work with ASP on another page of the site but it
works perfectly with PHP.
Isabel
Post by Chuck «BeyondFusion»
Isabel,
I imagine you'd only use the connection string portion of that script.
I'm assuming you're using the ASP flavor of the Fusion DB component.
Perhaps an ASP guru will weigh in.
As you know, I'm a PHP guy, myself.
--
Chuck Joslin
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com
Register domain names at www.awavedomains.com
Post by isabel
Hi Chuck
They do support dsn-less. They have a downloadable script here
http://www.lcn.biz/help/asp1.txt
Thanks
Isabel
Post by Chuck «BeyondFusion»
Your host may not support DSNless connections.
You need to check with them and see what they support.
--
Chuck Joslin
BeyondFusion.com - Your Fusion Community
www.beyondfusion.com
Register domain names at www.awavedomains.com
Hi
Can anyone give me a custom string for a dsn-less connection to an
Access database on an asp server. I can connect to a db on my local
drive through DSN but I can't use DSN on my webserver. All the
examples I've tried come up with JScript errors when published. This
is driving me nuts.
Many thanks
Isabel
Mike K
2006-11-16 20:31:27 UTC
Permalink
Here is a very useful site
http://www.connectionstrings.com

for DSN-Less always use the Jet driver

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User
Id=admin;Password=;"


Make sure the directory your access db is in has write permissions.
Hi
Can anyone give me a custom string for a dsn-less connection to an Access
database on an asp server. I can connect to a db on my local drive
through
DSN but I can't use DSN on my webserver. All the examples I've tried come
up with JScript errors when published. This is driving me nuts.
Many thanks
Isabel
isabel
2006-11-16 20:44:50 UTC
Permalink
Hi Mike

Thanks for your reply. Still can't get it to work. Getting the following
message: -

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified

/index.asp, line 12

Cheers

Isabel
Post by Mike K
Here is a very useful site
http://www.connectionstrings.com
for DSN-Less always use the Jet driver
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User
Id=admin;Password=;"
Make sure the directory your access db is in has write permissions.
Hi
Can anyone give me a custom string for a dsn-less connection to an Access
database on an asp server. I can connect to a db on my local drive
through
DSN but I can't use DSN on my webserver. All the examples I've tried come
up with JScript errors when published. This is driving me nuts.
Many thanks
Isabel
Mike K
2006-11-16 21:02:28 UTC
Permalink
where is your database stored?
it has to be somewhere in the root structure
for example if your data is stored in

wwwroot\data then the path is
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\data\mydb.mdb;"

if it is in the root then

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mydb.mdb;"

basically if you want to store the db outside the site structure
you can try this one

"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\anydatabase.mdb"

you must call out the exact path on the server
Post by isabel
Hi Mike
Thanks for your reply. Still can't get it to work. Getting the following
message: -
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/index.asp, line 12
Cheers
Isabel
Post by Mike K
Here is a very useful site
http://www.connectionstrings.com
for DSN-Less always use the Jet driver
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User
Id=admin;Password=;"
Make sure the directory your access db is in has write permissions.
Hi
Can anyone give me a custom string for a dsn-less connection to an Access
database on an asp server. I can connect to a db on my local drive
through
DSN but I can't use DSN on my webserver. All the examples I've tried come
up with JScript errors when published. This is driving me nuts.
Many thanks
Isabel
isabel
2006-11-16 21:18:59 UTC
Permalink
I've used this to display the path

<%
thepath = server.mappath("/Private/examples.mdb")
response.write thepath
%>

and it does give me the full path
e:\domains\r\mydomainname.com\user\htdocs\Private\examples.mdb

What I really need is the exact string that I need to put in to the custom
string line on the ASP connector. I figure that if I can connect via the
NOF component, I can get away without having to learn how to script.

Thanks

Isabel
Post by Mike K
where is your database stored?
it has to be somewhere in the root structure
for example if your data is stored in
wwwroot\data then the path is
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\data\mydb.mdb;"
if it is in the root then
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mydb.mdb;"
basically if you want to store the db outside the site structure
you can try this one
"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\anydatabase.mdb"
you must call out the exact path on the server
Post by isabel
Hi Mike
Thanks for your reply. Still can't get it to work. Getting the following
message: -
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/index.asp, line 12
Cheers
Isabel
Post by Mike K
Here is a very useful site
http://www.connectionstrings.com
for DSN-Less always use the Jet driver
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User
Id=admin;Password=;"
Make sure the directory your access db is in has write permissions.
Hi
Can anyone give me a custom string for a dsn-less connection to an
Access
Post by isabel
Post by Mike K
database on an asp server. I can connect to a db on my local drive
through
DSN but I can't use DSN on my webserver. All the examples I've tried come
up with JScript errors when published. This is driving me nuts.
Many thanks
Isabel
Mike K
2006-11-16 21:30:54 UTC
Permalink
Not ever using the components I cannot say
below is how I would script it

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
server.mappath("/Private/examples.mdb");

you could probably use

Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=e:\domains\r\mydomainname.com\user\htdocs\Private\examples.mdb;

maybe.. not sure not a component user

I rather code myself.. It really isn't that hard
once you get the hang of it.. Plus there are tons
of resources to help get yopu past the learning curve...

Also if this is a heavily used site you may want to consider moving to
SQL instead of access..
Post by isabel
I've used this to display the path
<%
thepath = server.mappath("/Private/examples.mdb")
response.write thepath
%>
and it does give me the full path
e:\domains\r\mydomainname.com\user\htdocs\Private\examples.mdb
What I really need is the exact string that I need to put in to the custom
string line on the ASP connector. I figure that if I can connect via the
NOF component, I can get away without having to learn how to script.
Thanks
Isabel
Post by Mike K
where is your database stored?
it has to be somewhere in the root structure
for example if your data is stored in
wwwroot\data then the path is
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\data\mydb.mdb;"
if it is in the root then
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mydb.mdb;"
basically if you want to store the db outside the site structure
you can try this one
"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\anydatabase.mdb"
you must call out the exact path on the server
Post by isabel
Hi Mike
Thanks for your reply. Still can't get it to work. Getting the following
message: -
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/index.asp, line 12
Cheers
Isabel
Post by Mike K
Here is a very useful site
http://www.connectionstrings.com
for DSN-Less always use the Jet driver
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User
Id=admin;Password=;"
Make sure the directory your access db is in has write permissions.
Hi
Can anyone give me a custom string for a dsn-less connection to an
Access
Post by isabel
Post by Mike K
database on an asp server. I can connect to a db on my local drive
through
DSN but I can't use DSN on my webserver. All the examples I've
tried
Post by isabel
Post by Mike K
Post by isabel
Post by Mike K
come
up with JScript errors when published. This is driving me nuts.
Many thanks
Isabel
isabel
2006-11-16 21:48:46 UTC
Permalink
No luck unfortunately, getting this error message: -

Microsoft OLE DB Service Components error '80040e73'
Format of the initialization string does not conform to the OLE DB
specification.

/index.asp, line 14

Looks as though I'm gonna have to learn it!

Thanks anyway

Isabel
Post by Mike K
Not ever using the components I cannot say
below is how I would script it
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
server.mappath("/Private/examples.mdb");
you could probably use
Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=e:\domains\r\mydomainname.com\user\htdocs\Private\examples.mdb;
maybe.. not sure not a component user
I rather code myself.. It really isn't that hard
once you get the hang of it.. Plus there are tons
of resources to help get yopu past the learning curve...
Also if this is a heavily used site you may want to consider moving to
SQL instead of access..
Post by isabel
I've used this to display the path
<%
thepath = server.mappath("/Private/examples.mdb")
response.write thepath
%>
and it does give me the full path
e:\domains\r\mydomainname.com\user\htdocs\Private\examples.mdb
What I really need is the exact string that I need to put in to the custom
string line on the ASP connector. I figure that if I can connect via the
NOF component, I can get away without having to learn how to script.
Thanks
Isabel
Post by Mike K
where is your database stored?
it has to be somewhere in the root structure
for example if your data is stored in
wwwroot\data then the path is
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\data\mydb.mdb;"
if it is in the root then
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=mydb.mdb;"
basically if you want to store the db outside the site structure
you can try this one
"DRIVER={Microsoft Access Driver (*.mdb)};DBQ=c:\anydatabase.mdb"
you must call out the exact path on the server
Post by isabel
Hi Mike
Thanks for your reply. Still can't get it to work. Getting the following
message: -
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager] Data source name not found and no default
driver specified
/index.asp, line 12
Cheers
Isabel
Post by Mike K
Here is a very useful site
http://www.connectionstrings.com
for DSN-Less always use the Jet driver
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\somepath\mydb.mdb;User
Id=admin;Password=;"
Make sure the directory your access db is in has write permissions.
Hi
Can anyone give me a custom string for a dsn-less connection to an
Access
Post by isabel
Post by Mike K
database on an asp server. I can connect to a db on my local drive
through
DSN but I can't use DSN on my webserver. All the examples I've
tried
Post by isabel
Post by Mike K
Post by isabel
Post by Mike K
come
up with JScript errors when published. This is driving me nuts.
Many thanks
Isabel
Daniel Callaghan
2007-05-17 16:43:40 UTC
Permalink
Hi Isobel

use the following in custom string on the connector properties : (needs the
spaces and is case sensitive)

You have to enter the path to your own database on the server - your ISP
should be able to give you the path to your home page and you add any
further path to that.

type all on one line in the field:

driver=microsoft access driver
(*.mdb);DBQ=e:\kunden\htdocs\BlahBlahBlah\mydatabase.mdb

Good luck

Daniel
Hi
Can anyone give me a custom string for a dsn-less connection to an Access
database on an asp server. I can connect to a db on my local drive
through DSN but I can't use DSN on my webserver. All the examples I've
tried come up with JScript errors when published. This is driving me
nuts.
Many thanks
Isabel
Loading...