Help with database connection

  • Thread starter Thread starter Paul M
  • Start date Start date
P

Paul M

Hi
How do I find out the dsn connection string for an access database stored in
the fpdb folder of a website
Thank
Paul M
 
Thanks
I can't see anything that says dsn the connection code I am trying to
change is

'making connection to database
set objcon=server.createObject("aadodb.connection")
'opening database
objcon.open "dsn=dsnname"

Thanks
Paul M
 
Use

Dim dsnname
dsnname = Application("XXXXX_ConnectionString")
set objcon = Server.CreateObject("ADODB.Connection")
objcon.Open dsnname

The value for XXXXX above is the value you see when you open the global.asa file (in your root)
Usually in the line
Application("XXXXX_ConnectionString") = "........;DRIVER={Microsoft Access Driver (*.mdb)}"

--




| Thanks
| I can't see anything that says dsn the connection code I am trying to
| change is
|
| 'making connection to database
| set objcon=server.createObject("aadodb.connection")
| 'opening database
| objcon.open "dsn=dsnname"
|
| Thanks
| Paul M
|
|
| | > If it was created using the DIW then you can look in the global.asa file.
| >
| > --
| > Mike -- FrontPage MVP '97-'02
| > J-Bots 2004 Released Special Pricing
| > http://www.websunlimited.com
| > FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible
| >
| | > > Hi
| > > How do I find out the dsn connection string for an access database
| stored in
| > > the fpdb folder of a website
| > > Thank
| > > Paul M
| > >
| > >
| >
| >
|
|
 
Apologize for tagging on -

I am getting this msg:

Provider error '80004005'

Unspecified error

/step1-DW.asp, line 85

The website has a series of .asp pages that should check for existing
records in the Access DB. If found, take user to page to ask if password is
forgotten. If not found, take user to registration page.

Line 85 of code is this:

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.open = CONNECTION_STRING

I checked the Connection.asp file to verify it is still pointing at the
correct Access DB. It is.

Why would it suddenly no longer be willing to open the connection? It
worked before. No new software installed. Properties and permissions still
show the DB is writable. Using Win2000 Server.

TIA,
 
Have you tried changing line 85, as per Stefan suggestion?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
No, I had not. When I went to do this, I decided to check it to see if it
would work correctly first. And it did! It's an intermittent problem. Any
ideas as to why it's unstable? Would changing line 85 correct the
instability?
 
It may.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
Back
Top