Code Comments
Programming Forum and web based access to our favorite programming groups.Windows XP, Frontpage 2000, IIS 5.1, Access 2000
When I attempt to open a connection to my database I get an error the
page cannot be found... this on my local machine, using localhost. The page
works correctly when viewed on my host's site.
The code:
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.open "gmarc"
I have a response.write test line within my asp code which displays
correctly
until I add the "Conn.open" line. The DSN is correct. Could there have
been
a change in XP in the way ODBC is configured?
Earl
Post Follow-up to this messageOn Sat, 25 Sep 2004 23:30:07 GMT, "Earl Partridge"
<earlpNG@pearnet.com> wrote:
>Windows XP, Frontpage 2000, IIS 5.1, Access 2000
>
>When I attempt to open a connection to my database I get an error the
>page cannot be found... this on my local machine, using localhost. The pag
e
>works correctly when viewed on my host's site.
>
>The code:
> Set Conn = Server.CreateObject("ADODB.Connection")
> Conn.open "gmarc"
>
>I have a response.write test line within my asp code which displays
>correctly
>until I add the "Conn.open" line. The DSN is correct. Could there have
>been
>a change in XP in the way ODBC is configured?
It's configured the same. But we can't help with your error, you need
to post the entire error. And it's possible the problem has nothing
to do with your database anyway, try some testing using
Response.Writes and commenting out sections of your page to see if it
worked. Check the IIS logs and see what got requested.
Jeff
Post Follow-up to this messageWhere would I find that log? I've searched localhost/iishelp and where it suggests "select the Enable Logging check box", I have right clicked my computer name but do not find "Enable Logging" check box, only the box to "Log Visits". Earl "Jeff Cochran" <jeff.nospam@zina.com> wrote in message news:41563163.148753566@msnews.microsoft.com... > On Sat, 25 Sep 2004 23:30:07 GMT, "Earl Partridge" > <earlpNG@pearnet.com> wrote: > > > It's configured the same. But we can't help with your error, you need > to post the entire error. And it's possible the problem has nothing > to do with your database anyway, try some testing using > Response.Writes and commenting out sections of your page to see if it > worked. Check the IIS logs and see what got requested. > > Jeff
Post Follow-up to this messageOn Sun, 26 Sep 2004 14:28:30 GMT, "Earl Partridge" <earlpNG@pearnet.com> wrote: >Where would I find that log? I've searched localhost/iishelp and where it >suggests "select the Enable Logging check box", I have right clicked my >computer name but do not find "Enable Logging" check box, only the box >to "Log Visits". IIS MMC in Administrative Tools -> Web Site -> Properties -> Bottom of the Web Site Tab. Look at the Logging Properties and it shows the path. Jeff >"Jeff Cochran" <jeff.nospam@zina.com> wrote in message >news:41563163.148753566@msnews.microsoft.com... >
Post Follow-up to this messageThe error is: Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /gmarc/test.asp, line 29 Line 29 is the "Conn.Open "gmarc". The log file contained the following: #Software: Microsoft Internet Information Services 5.1 #Version: 1.0 #Date: 2004-09-26 21:06:05 #Fields: time c-ip cs-method cs-uri-stem sc-status 21:06:05 192.168.0.2 GET /gmarc/test.asp 500 The dsn and the path are correct. Earl "Jeff Cochran" <jeff.nospam@zina.com> wrote in message news:41570a5a.204294319@msnews.microsoft.com... > On Sun, 26 Sep 2004 14:28:30 GMT, "Earl Partridge" > <earlpNG@pearnet.com> wrote: > > > IIS MMC in Administrative Tools -> Web Site -> Properties -> Bottom of > the Web Site Tab. Look at the Logging Properties and it shows the > path. > > Jeff > >
Post Follow-up to this messageOn Sun, 26 Sep 2004 21:20:33 GMT, "Earl Partridge" <earlpNG@pearnet.com> wrote: >The error is: > Error Type: > Microsoft OLE DB Provider for ODBC Drivers (0x80004005) > [Microsoft][ODBC Driver Manager] Data source name not found and no >default driver specified > /gmarc/test.asp, line 29 > >Line 29 is the "Conn.Open "gmarc". I've answered that one in another thread, but also see: Why do I get database-related 80004005 errors? http://www.aspfaq.com/show.asp?id=2009 >The log file contained the following: > #Software: Microsoft Internet Information Services 5.1 > #Version: 1.0 > #Date: 2004-09-26 21:06:05 > #Fields: time c-ip cs-method cs-uri-stem sc-status > 21:06:05 192.168.0.2 GET /gmarc/test.asp 500 See: Why do I get a 500 Internal Server error for all ASP errors? http://www.aspfaq.com/show.asp?id=2109 >The dsn and the path are correct. But I don't believe your code is. See the answer I posted in another group/thread. Jeff >"Jeff Cochran" <jeff.nospam@zina.com> wrote in message >news:41570a5a.204294319@msnews.microsoft.com... >
Post Follow-up to this messageIn ASPFAQ item 2009 I followed the 3rd item which I thought might be the problem... that I do not have access, continuing to KB #306345, using an ODBC DSN "Insufficient Permissions to Read the DSN Registry Key". I followed the regedit HKLM...\ODBC.INI, where it indicates there should be a sub key entry for each DSN... There was only a blank Default entry. And under ODBC.INI was ODBCFile DSN with a sub key DefaultDSN Dir which is not where the database resides. I copied the database to that default, rather than changing the default, but that did not resolve the problem either. It appears somehow that the ODBC.INI key is not updated with the DSNs. I'll be looking around to see if I can find how to manually add them. Earl "Jeff Cochran" <jeff.nospam@zina.com> wrote in message news:4157f226.263625753@msnews.microsoft.com... > On Sun, 26 Sep 2004 21:20:33 GMT, "Earl Partridge" > <earlpNG@pearnet.com> wrote: > > > I've answered that one in another thread, but also see: > > Why do I get database-related 80004005 errors? > http://www.aspfaq.com/show.asp?id=2009 > > > > See: > > Why do I get a 500 Internal Server error for all ASP errors? > http://www.aspfaq.com/show.asp?id=2109 > > > But I don't believe your code is. See the answer I posted in another > group/thread. > > Jeff > > >
Post Follow-up to this messageSince everyone else forgot to mention this I will. Please read the following links. It might not get rid of the error but at least your application will be faster http://www.aspfaq.com/show.asp?id=2126 http://msdn.microsoft.com/library/d..._components.asp Earl Partridge wrote: > In ASPFAQ item 2009 I followed the 3rd item which I thought might be the > problem... that I do not have access, continuing to KB #306345, using an > ODBC DSN > "Insufficient Permissions to Read the DSN Registry Key". > I followed the regedit HKLM...\ODBC.INI, where it indicates there should b e > a > sub key entry for each DSN... There was only a blank Default entry. > > And under ODBC.INI was ODBCFile DSN with a sub key DefaultDSN Dir which > is not where the database resides. I copied the database to that default, > rather than > changing the default, but that did not resolve the problem either. > > It appears somehow that the ODBC.INI key is not updated with the DSNs. I' ll > be looking around to see if I can find how to manually add them. > Earl
Post Follow-up to this messageProblem Solvedl! I have several databases from earlier versions, Windows 98 and Frontpage 97... all were User DSNs, all worked correctly previously. I may have too hurriedly scanned over some of the links I've been sent to, and maybe missed the point that System DSN should be used instead. I moved my database from User to System and it works. Thanks for hanging with me. Earl "Joker" <no-spam@netzero.com> wrote in message news:%236fsz7UpEHA.3428@TK2MSFTNGP11.phx.gbl... > Since everyone else forgot to mention this I will. Please read the > following links. It might not get rid of the error but at least your > application will be faster > > http://www.aspfaq.com/show.asp?id=2126 > > http://msdn.microsoft.com/library/d..._components.asp > > Earl Partridge wrote: > >
Post Follow-up to this messageStop using ODBC/DSN for your database connection. It is slow & cumbersome. http://www.aspfaq.com/show.asp?id=2126 http://msdn.microsoft.com/library/d..._components.asp http://support.microsoft.com/?scid=252475 252475 PRB: ODBC Admin Displays Only a Certain Number of DSNs So one last time stop using ODBC/DSN as it will cause the system to be slower & is harder to deal with. I always use server side include files to store my database connection strings. Earl Partridge wrote: > Problem Solvedl! I have several databases from earlier versions, Windows 98 > and Frontpage 97... all were User DSNs, all worked correctly previously. > I may have too hurriedly scanned over some of the links I've been sent to, > and > maybe missed the point that System DSN should be used instead. I moved > my database from User to System and it works. > Thanks for hanging with me. > Earl
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.