Help with database connection

Help with database connection

Post by Paul » Thu, 11 Nov 2004 00:04:46


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
 
 
 

Help with database connection

Post by MD Websunl » Thu, 11 Nov 2004 00:37:41

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.yqcomputer.com/
FrontPage Add-ins Since '97 FP 2003 / 2002 / 2000 Compatible

 
 
 

Help with database connection

Post by Paul » Thu, 11 Nov 2004 01:03:24

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






stored in
 
 
 

Help with database connection

Post by Stefan B R » Thu, 11 Nov 2004 18:39:30

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)}"

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.yqcomputer.com/
_____________________________________________



| 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.yqcomputer.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
| > >
| > >
| >
| >
|
|
 
 
 

Help with database connection

Post by RGlhbm5 » Tue, 01 Feb 2005 03:39:02

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,
 
 
 

Help with database connection

Post by Thomas A. » Tue, 01 Feb 2005 04:34:09

ave you tried changing line 85, as per Stefan suggestion?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Dianne" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...


 
 
 

Help with database connection

Post by RGlhbm5 » Wed, 02 Feb 2005 06:59:04

o, 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?


"Thomas A. Rowe" wrote:

 
 
 

Help with database connection

Post by Thomas A. » Wed, 02 Feb 2005 07:05:45

t may.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
To assist you in getting the best answers for FrontPage support see:
http://www.net-sites.com/sitebuilder/newsgroups.asp

"Dianne" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...