Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Error loading page while uploading database


Message #1 by "Steve Burr" <steveb1164@a...> on Thu, 23 Jan 2003 20:11:03
I'm getting the following error when I try to load one of my ASP pages 
while I'm uploading the database to the server.  The connection code I'm 
using is below the error.  I was told I should use an OLE DB connection 
instead, but I can't figure out what the code would be.  Thanks for any 
help.

Error:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Microsoft Access Driver] Cannot open 
database '(unknown)'. It may not be a database that your application 
recognizes, or the file may be corrupt. 

/baseball/rankmemrank.asp, line 409

Code:

Set connection=Server.CreateObject("ADODB.Connection")
connection.Open "DSN=baseball"

SQLbatter = "SELECT * FROM stats929"
			
Set objCommand = Server.CreateObject("ADODB.Command")
objCommand.ActiveConnection = connection
objCommand.CommandText = SQLbatter
objCommand.CommandType = adCmdText

Set rsbatter = Server.CreateObject("ADODB.Recordset")
rsbatter.Open objCommand,,adOpenForwardOnly, adLockOptimistic

Message #2 by "Pat Wong" <vinyl-junkie@n...> on Thu, 23 Jan 2003 18:15:27 -0800
I've gotten that error when the database hasn't been available for some reason on the Web
server. When I tried later my page has worked fine. Another possibility, and admittedly I'm
guessing here, is that you are not authorized to access the database.

Hope this helps.



| I'm getting the following error when I try to load one of my ASP pages
| while I'm uploading the database to the server.  The connection code I'm
| using is below the error.  I was told I should use an OLE DB connection
| instead, but I can't figure out what the code would be.  Thanks for any
| help.
|
| Error:
|
| Microsoft OLE DB Provider for ODBC Drivers error '80004005'
|
| [Microsoft][ODBC Microsoft Access Driver] Cannot open
| database '(unknown)'. It may not be a database that your application
| recognizes, or the file may be corrupt.
|
| /baseball/rankmemrank.asp, line 409


~8^) Pat Wong (ICQ #61070813)
http://www.napathon.com/
-------------------------------------------------------------------
Senility Prayer:
God grant me the senility to forget the people I never
liked anyway, the good fortune to run into the ones I
like, and the eyesight to tell the difference.
-------------------------------------------------------------------


  Return to Index