Database Connection Problem

This public forum is for user-to-user discussions of ASP Report Maker. Note that this is not support forum.

Database Connection Problem

Postby tazmainiac » Fri Dec 09, 2016 9:56 am

I am using Report Maker 9 and despite whichever connection method I try I get similar error, they are just a little deferent for each method.

Microsoft JET Database Engine error '80004005'

Could not find file 'C:\inetpub\wwwroot\MICEM\chem\..dbMICEM.mdb'.

/micem/chem/rptinc/ewrfn9.asp, line 5536

The exact same connection works with ASP Maker 2017 but the above has added the "db" to the database name.
I also download the template file it gave same results.......
tazmainiac
 
Posts: 5
Joined: Thu Mar 20, 2014 2:10 pm

Re: Database Connection Problem

Postby motfs » Fri Dec 09, 2016 11:52 am

> /micem/chem/rptinc/ewrfn9.asp, line 5536

Post the error line with additional line so other people may know what is the actual error.

> has added the "db" to the database name
> Could not find file 'C:\inetpub\wwwroot\MICEM\chem\..dbMICEM.mdb'.

You mean the database name is changed to ..dbMICEM.mdb but the correct database name is MICEM.mdb. Check the generated file "ewrcfg9.asp" in this folder "<project>\rptinc" to look for EWR_CONN(0) to check the database name and database path.

Have you tried to generate the demo project to see if there is similar error?
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: Database Connection Problem

Postby tazmainiac » Fri Dec 09, 2016 5:47 pm

"Microsoft JET Database Engine error '80004005'

Could not find file 'C:\inetpub\wwwroot\MICEM\chem\..dbMICEM.mdb'.

/micem/chem/rptinc/ewrfn9.asp, line 5536" is all that shows in the browser even in debug mode.

Yes the database name is micem.mdb and somehow it is changing it to the above. It should be "'C:\inetpub\wwwroot\MICEM\db\micem.mdb".

This is what is in ewrcfg9.asp has:

Dim EWR_CONN(0)
EWR_CONN(0) = Array(Array("conn", Null), Array("id", "DB"), Array("type", "ACCESS"), Array("provider", "Provider=Microsoft.Jet.OLEDB.4.0"), Array("relpath", "../db/"), Array("dbname", "MICEM.mdb"), Array("password", ""), Array("qs", "["), Array("qe", "]"))
Const EWR_DBMSNAME = "MS Jet"
Const EWR_IS_MSACCESS = True ' Access
Const EWR_IS_MSSQL = False ' MS SQL
Const EWR_IS_MYSQL = False ' MySQL
Const EWR_IS_POSTGRESQL = False ' PostgreSQL
Const EWR_IS_ORACLE = False ' Oracle
Const EWR_DB_QUOTE_START = "["
Const EWR_DB_QUOTE_END = "]"
Const EWR_CURSOR_LOCATION = 2

The demo project works fine and has no errors.
tazmainiac
 
Posts: 5
Joined: Thu Mar 20, 2014 2:10 pm

Re: Database Connection Problem

Postby motfs » Sat Dec 10, 2016 12:04 pm

The database path is relative to application root. If the application root is "C:\inetpub\wwwroot\MICEM", the path should be "db/" (no need to add ../). Read Data Source Settings -> 1. Microsoft Access Setup in help file for more details.
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: Database Connection Problem

Postby tazmainiac » Sat Dec 10, 2016 4:06 pm

Because the files being accessed are located in C:\inetpub\wwwroot\MICEM\chem and the database is at C:\inetpub\wwwroot\MICEM\db the ../db is required. In other words, the database is in a different folder under "micem" than the web pages (database in folder db and pages in folder chem). Without the ../ Report Maker copies the database into the chem folder.

I loaded in ASPReport Maker 6 to test the connection and it worked along with ASP Maker 2017 and both require "../db/" so why will it work in them but not Report Maker 9?
tazmainiac
 
Posts: 5
Joined: Thu Mar 20, 2014 2:10 pm

Re: Database Connection Problem

Postby motfs » Tue Dec 13, 2016 12:20 pm

You may try to set Application Root Folder as C:\inetpub\wwwroot\MICEM\ and Destination Folder as C:\inetpub\wwwroot\MICEM\chem and set Database path as "db/" to try again. Read Application Root in help file for more details.
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: Database Connection Problem

Postby tazmainiac » Tue Dec 13, 2016 5:25 pm

Tried using direct connection and also Access connection with application root as C:\inetpub\wwwroot\MICEM\ then destination as C:\inetpub\wwwroot\MICEM\chem\ then Database path db//which is what the help listed and got

Microsoft JET Database Engine error '80004005'

Could not find file 'C:\inetpub\wwwroot\MICEM\chem\db\MICEM.mdb'.

/micem/chem4/rptinc/ewrfn9.asp, line 5980

After trying the above I replaced the db/ in the database path with ../db/ using the Access connection and everything worked so not sure the help instructions are correct because when the browser is accessing the pages it assumes that is the app root and will look for a db folder at that level but with the ../ your telling the browser that root is actually in the level above. Since with a Direct Connection there is not place to add the ../ it still gives the same error above but I am just going to go with what works and use the Access conection with ..\db\.

My mistake was not the ../ but that I had the application root and destination both as chem instead of like motfs mentioned with root as micem and destination as chem. Thank you for getting me in the right direction.
tazmainiac
 
Posts: 5
Joined: Thu Mar 20, 2014 2:10 pm


Return to General Discussion (ASP Report Maker)