two problems. Can't debug problem I shouldn't have

T

Tom D.

I just got a new computer. I transfered my web site files
over and setup my access database system ODBC driver.

I've compared settings on both computers. But when I run
my web site code on new machine I get...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Not a valid
password.

However, I can successfully use this ODBC driver with
other tools such as Microsoft Excel with no problem. It's
the same database and ALL the ODBC driver settings are
correct.

Code in ASP page reads
Set db = Server.CreateObject("ADODB.Connection")
db.open strConn, strUser, strPass

So I decide I would debug. I checked "enable ASP Server
side debugging", but I can't debug. I insert "Stop" in my
code and nothing I do is throwing me into the debugger.
 
B

Bob Barrows

Here is a good article for troubleshooting connection problems:
http://www.aspfaq.com/show.asp?id=2009

Here are my recommendations:

1) Stop using ODBC (http://support.microsoft.com/?kbid=222135). Switch to
the newer, more robust, native Jet OLEDB provider. See
www.connectionstrings.com or www.able-consulting.com/ado_conn.htm for
details.

2) Your connection string could be wrong, but we can't know for sure
because, well, um ... you did not show us your connection string. :)

3) Maybe you shouldn't be supplying a password in your .Open statement - we
just don't know for sure because you did not provide any details about how
your database is set up. If you don't have a password-secured database, then
you shold not be supplying a password in your .Open statement. You should do
some reading about Access security so you can communicate those details to
us better. Here is a link to the MS Access Security FAQ white paper:
http://student.muskegon.cc.mi.us/~carlsonr/Secfaq.exe
FWIW, I've never supplied a user name or password in my .Open statement when
opening a connection to an Access database.

HTH,
Bob Barrows
 
T

Tom D

1) I'll take a look

2) Sorry. strConn is the name of the System ODBC Driver.
I can assure you there is nothing wrong with the
connection string. This has to be a configuration issue.
The code works on my hosted web server and my old PC. I
copied it to new pc and it doesn't work. I've verified
all the ODBC settings and they are EXACT match to what is
used for functional machines.

3) The Database does have a password. I want to secure it
in case anyone gets lucky and is able to download it from
my site somehow.

4) any hints about debugging?
-----Original Message-----
Here is a good article for troubleshooting connection problems:
http://www.aspfaq.com/show.asp?id=2009

Here are my recommendations:

1) Stop using ODBC (http://support.microsoft.com/? kbid=222135). Switch to
the newer, more robust, native Jet OLEDB provider. See
www.connectionstrings.com or www.able-
consulting.com/ado_conn.htm for
details.

2) Your connection string could be wrong, but we can't know for sure
because, well, um ... you did not show us your connection string. :)

3) Maybe you shouldn't be supplying a password in your .Open statement - we
just don't know for sure because you did not provide any details about how
your database is set up. If you don't have a password- secured database, then
you shold not be supplying a password in your .Open statement. You should do
some reading about Access security so you can communicate those details to
us better. Here is a link to the MS Access Security FAQ white paper:
http://student.muskegon.cc.mi.us/~carlsonr/Secfaq.exe
FWIW, I've never supplied a user name or password in my .Open statement when
opening a connection to an Access database.

HTH,
Bob Barrows
I just got a new computer. I transfered my web site files
over and setup my access database system ODBC driver.

I've compared settings on both computers. But when I run
my web site code on new machine I get...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Not a valid
password.

However, I can successfully use this ODBC driver with
other tools such as Microsoft Excel with no problem. It's
the same database and ALL the ODBC driver settings are
correct.

Code in ASP page reads
Set db = Server.CreateObject("ADODB.Connection")
db.open strConn, strUser, strPass

So I decide I would debug. I checked "enable ASP Server
side debugging", but I can't debug. I insert "Stop" in my
code and nothing I do is throwing me into the debugger.



.
 
B

Bob Barrows

Tom said:
1) I'll take a look

2) Sorry. strConn is the name of the System ODBC Driver.
I can assure you there is nothing wrong with the
connection string. This has to be a configuration issue.
The code works on my hosted web server and my old PC. I
copied it to new pc and it doesn't work. I've verified
all the ODBC settings and they are EXACT match to what is
used for functional machines.

Different versions of ADO may be causing this. Again. Don't worry about
figuring out why. Simply stop using ODBC. It has been deprecated.
3) The Database does have a password. I want to secure it
in case anyone gets lucky and is able to download it from
my site somehow.

OK, then you need to use the password-secured string from one of the sites I
gave you:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet
OLEDB:Database Password=MyDbPassword;"

4) any hints about debugging?
The aspfaq article.

-----Original Message-----
Here is a good article for troubleshooting connection problems:
http://www.aspfaq.com/show.asp?id=2009

Here are my recommendations:

1) Stop using ODBC (http://support.microsoft.com/? kbid=222135).
Switch to the newer, more robust, native Jet OLEDB provider. See
www.connectionstrings.com or www.able-
consulting.com/ado_conn.htm for
details.

2) Your connection string could be wrong, but we can't know for sure
because, well, um ... you did not show us your connection string. :)

3) Maybe you shouldn't be supplying a password in your .Open statement - we
just don't know for sure because you did not provide any details
about how your database is set up. If you don't have a password-
secured database, then you shold not be supplying a password in your
.Open statement. You should do some reading about Access security so
you can communicate those details to us better. Here is a link to
the MS Access Security FAQ white paper:
http://student.muskegon.cc.mi.us/~carlsonr/Secfaq.exe FWIW, I've
never supplied a user name or password in my .Open statement when
opening a connection to an Access database.

HTH,
Bob Barrows
I just got a new computer. I transfered my web site files
over and setup my access database system ODBC driver.

I've compared settings on both computers. But when I run
my web site code on new machine I get...

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Not a valid
password.

However, I can successfully use this ODBC driver with
other tools such as Microsoft Excel with no problem. It's
the same database and ALL the ODBC driver settings are
correct.

Code in ASP page reads
Set db = Server.CreateObject("ADODB.Connection")
db.open strConn, strUser, strPass

So I decide I would debug. I checked "enable ASP Server
side debugging", but I can't debug. I insert "Stop" in my
code and nothing I do is throwing me into the debugger.



.
 
B

Bullschmidt

<<
4) any hints about debugging?
Of course Response.Write's are a good way to do some debugging.

For example in a login page where the user's access level is assigned to
a session variable one could do something like the following:
Response.Write objRST("UserName") & "<br>"
Response.Write objRST("UserPassword") & "<br>"
Response.Write objRST("UserAccess") & "<br>"
Response.Flush
Response.End

The second of the last line above is often required if buffering is set
on (Response.Buffer = True) which it perhaps usually would be.
The last line above is optional for if you need to stop the code from
running after that point (i.e. to avoid a page redirect or something).

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 
P

Phillip Windell

Bob Barrows said:
3) The Database does have a password. I want to secure it
in case anyone gets lucky and is able to download it from
my site somehow.

Just don't put it in the Web Path and you won't have to worry about
that. The Connection String can find it anywhere on the machine as
long as the File Permissions are correct,...it doesn't need to be
(shouldn't be) within the Website's "tree".

--

Phillip Windell [CCNA, MVP, MCP]
(e-mail address removed)
WAND-TV (ABC Affiliate)
www.wandtv.com
 
T

TomD

My choices for Database is limited by my web hosting
company.

Problem turned out to be the temp directory didn't have
the right permissions.

I've got a priority support call opened with Microsoft at
the moment to figure out the debugging issues.

10 hours later, they still don't know. but they are
working on it.

thanks.

-----Original Message-----

Bob Barrows said:
3) The Database does have a password. I want to secure it
in case anyone gets lucky and is able to download it from
my site somehow.

Just don't put it in the Web Path and you won't have to worry about
that. The Connection String can find it anywhere on the machine as
long as the File Permissions are correct,...it doesn't need to be
(shouldn't be) within the Website's "tree".

--

Phillip Windell [CCNA, MVP, MCP]
(e-mail address removed)
WAND-TV (ABC Affiliate)
www.wandtv.com


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top