Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DSN connection to An access databsae 1

Status
Not open for further replies.

seaport

MIS
Jan 5, 2000
923
US
My ASP book recommend to use a System DSN to connect to an Access database, since "if you use a DSN-less connection, the connection information must be revalidated every time. With a System DSN, this must only be done once, when creating the System DSN."

However, I found out that when using the System DSN (connecting to an Access database), the connection is not stable. Sometimes the ASP application works fine, and sometimes I got the error located at the line where the code tries to open the connection. I did not run into this message when I use DSN-less connection.

Could anyone tell me why?

How about the DSN connection to a SQL 2000 server? Is that stable?

Thanks in advance.

Seaport
 
I've never had a problem using a DSN... are you setting your connection = nothing when you are finished with it? ASP is supposed to be stateless, but it isn't, and if you don't set your objects = nothing, you will run into problems.

What is the error it's returning?

paul
penny.gif
penny.gif
 
Paul, thanks for your response.

It is funny that I do not run into this error any more after I try DSN connection again today. So I can not tell what the error is.

Also, I did use "set cnn=nothing" to release the connection object in very asp file.

Seaport
 
I got the error again. Here are the details:

Error number:-2147467259
Category: Provider
Description: Unspecified error

Currently, the ASP application on my Personal Web Server works fine. However, the same ASP application on the IIS is not stable.

Seaport
 
An unspecified provider error. Don't you just love that?
%-(

So it's ODBC that's returning it... I would try upgrading the MDAC on the server in question and see if that clears it up... maybe just get the latest service pack for the server. It'll be in there.

You shouldn't be getting that error, and no, DSN's should not be unstable.

However, your reasoning up there for using a DSN has it's counterpart. DSN's require a registry lookup every time you use it, whereas the DSN-less does not.

- performance + performance = same performance

It really just depends on so many different things about how you have your servers set up as to which way is the bar-none best for your situation, but if you just can't get it working reliably w/ a DSN, then don't hesitate to go back to your DSN-less connection. You aren't going to see a huge gain or loss in performance either way.

:)
paul
penny.gif
penny.gif
 
I have been looking at several sites to find out how to publish an Access Form to a web page. This form has a List box that is driven off a query anda table in the database. How do I get this to work, I tried saving and exporting to ASP, but when I connect as a System DSN, nothing is coming up, please help. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top