CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 MS Access + ASP: Server Connection Issue (C:\WINDOWS\system32\inetsrv)

Print topic Send  topic

Author Message
jrs3

Posts: 12
Posted: 07/20/2006, 9:17 AM

Project uses MS Access DB on remote WIN2003 Server. I am able to publish project with no problem to the server; however, I cannot make database changes -- e.g., user requests additional fields or tables be added and project updated.

I have placed the MS Access DB in a server-side directory, but what I have found is the ASP files are actually writing record updates to C:\WINDOWS\system32\inetsrv directly on the server, and I do not have access to that directory to modify the DB.

ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= forcetrack.mdb; Persist Security Info=False"

I am not sure why the DB would be written to that directory, as both my server side and design side connection settings specify a separate directory altogether. Since I cannot access C:\WINDOWS\system32\inetsrv on this server, I am in a real bind.

Has anyone seen this scenario before? Any advise is greatly appreciated.
View profile  Send private message
jrs3

Posts: 12
Posted: 07/20/2006, 9:22 AM

Sorry typo


ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source= .forcetrack.mdb; Persist Security Info=False"
View profile  Send private message
DonB
Posted: 07/20/2006, 7:51 PM

Because you didn't specify a path to the database file and so it defaults to
the same location where the IIS service EXEs live.

--
DonB

http://www.gotodon.com/ccbth


"jrs3" <jrs3@forum.codecharge> wrote in message
news:644bfadb474f03@news.codecharge.com...
> Sorry typo
>
>
> ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=
> forcetrack.mdb; Persist Security Info=False"
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

peterr


Posts: 5971
Posted: 07/20/2006, 11:40 PM

Yep. Simply specify the exact location of your database.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
jrs3

Posts: 12
Posted: 07/26/2006, 12:50 PM

Same problem.

Attempted to specify path using IP, URL, and the mapped directory from my PC does not work (U:\db\forcetrack.mdb).

Also attempted using MapPath connection string
ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("forcetrack.mdb") & ";Persist Security Info=False"
to no avail.

Successful test connection in CCS, but once published the same issues as before apply.

Obviously this is pilot error on my end, but I'm afraid I've tried every way I can think of to resolve....any ideas?

View profile  Send private message
peterr


Posts: 5971
Posted: 07/26/2006, 1:07 PM

Let's see:
1. How do you know that something is written to "C:\WINDOWS\system32\inetsrv" if you don't have access to that directory.

2. If the symptoms are exactly the same no matter what you do then most likely none of your changes work.
Try:
ConnectionString = abc
If this connection string also writes something to "C:\WINDOWS\system32\inetsrv" then you don't have a problem with the connection, just making changes in a wrong place (possibly wrong folder, wrong file)

3. Mapped directory like "U:\db\forcetrack.mdb" is not equivalent to Server.MapPath("forcetrack.mdb") , therefore possibly I don't understand why you tried to use both of them. The database should be either at "U:\db\forcetrack.mdb" , or in a local server folder - but cannot be both. So where is that database? And what is the path to the database on the server, not mapped from your local PC?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
jrs3

Posts: 12
Posted: 07/26/2006, 2:02 PM

1. How do you know that something is written to "C:\WINDOWS\system32\inetsrv" if you don't have access to that directory.

Had remote server admin scan, and DB was being written to C:\\WINDOWS\system32\inetsrv. He had no idea why, but DonB's response clarified the situation.

Quote :
If the symptoms are exactly the same no matter what you do then most likely none of your changes work.


Quote :
Mapped directory like "U:\db\forcetrack.mdb" is not equivalent to Server.MapPath("forcetrack.mdb") , therefore possibly I don't understand why you tried to use both of them.

I included both (U:\db\forcetrack.mdb and Server.MapPath) but I failed to specify I attempted them separately -- not together.


Additional info is as follows

Project Settings
- Server Path: U:\db\forcetrack.md (tried IP and URL but received errors on both)
- Server URL: http://90......db/forcetrack.mdb

Connection String (both design and server): Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=forcetrack.mdb;Mode=Share Deny None;Persist Security Info=False


======
When published, I do get the Login page but receive the following error after the initial login:


Unable to establish connection to database.

* Error information:
Microsoft JET Database Engine (0x80004005)
Could not find file 'c:\windows\system32\inetsrv\forcetrack.mdb'.


=======
I have reviewed documentation and I'm sure I have just missed something changing connection strings.
View profile  Send private message
Marcus


Posts: 49
Posted: 07/27/2006, 9:29 AM

"Server.MapPath("forcetrack.mdb") " specifies current directory or any directory BELOW the current one.

I see your database directory as being outside this constraint, so you MUST use the actual path "C:\xxx\xxx\xxx.mdb" instead of the Server.MapPath("forcetrack.mdb")
View profile  Send private message
jrs3

Posts: 12
Posted: 07/27/2006, 10:06 AM

Thanks Marcus...

Unfortunately, therein lies the problem. I do not see why the DB would be written to c:\windows\system32\inetsrv\ --- and not the directory I have placed the database in (mapped dir U:\ .....*.mdb).

This is a remote server, and I cannot access c:\windows\system32\inetsrv\

I've tried using the IP for the server, but that does not work. This seems like it would be a non-issue. I've redone the connection with/without using MapPath, just to test -- same results apply.

My connection is going dir to U:\....... also results in the error captured in yesterday's post.
View profile  Send private message
peterr


Posts: 5971
Posted: 07/27/2006, 2:00 PM

The use of "c:\windows\system32\inetsrv\" is normal and expected - this is exactly what should happen when you specify only the database name.

Quote :
Successful test connection in CCS, but once published the same issues as before apply.
...
Same problem.
I simply don't believe that you get the same error when using MapPath or specify the full name of your database. If you always get the same error then I'm assuming that none of your changes work at all, so no matter what you do you won't resolve the problem. It's just not possible that the connection string containing "U:\db\forcetrack.mdb" will return the error "Could not find file 'c:\windows\system32\inetsrv\forcetrack.mdb'" and that the connection string containing MapPath will also return the error "Could not find file 'c:\windows\system32\inetsrv\forcetrack.mdb'" , and that every other connection string will always return the exact same error.
If what you wrote is true then the only thing you can do right now is to delete "Common.asp" and then change the connection string (Server) in CCS and again use MapPath or database path, and you must get a different error. Then the error itself may provide additional clues. It just cannot be same error every time.

Quote :
I included both (U:\db\forcetrack.mdb and Server.MapPath) but I failed to specify I attempted them separately -- not together.
Of course. That's why I'm asking why you used each of them, since each one points to a different database location. The database must be either at U:\db\forcetrack.mdb or at Server.MapPath. So you need to decide where your database is located. Is it at U:\db\forcetrack.mdb , or is it in the local application path (Server.MapPath)?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
jrs3

Posts: 12
Posted: 07/27/2006, 3:13 PM

Peterr - thank you for your patience and responses.

DB is physically on the directory I mapped to remote server (e.g., U:\...*mdb).

I never placed it on C:\...inetsrv, but I do understand the reasoning behind why I received that error. I've specified U:\ directory in common.asp and connection settings, but

The only reason I attempted using the diff connection strings (separately, *never* together in Design/Server connection profile or Common.asp) is because of errors received.

1 - Using U:\ .....*mdb in Connection Profile

DESIGN Connection
Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=U:\db\forcetrack.mdb;Mode=Share Deny None;Persist Security Info=False

SERVER Connection:
Same as Design connection above

COMMON.ASP Line 151:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=U:\db\forcetrack.mdb;Persist Security Info=False


My original concern was that the connection wasn't working in common.asp because of the mapped "U" drive from my pc to the remote server.
===============
ERROR received when project published:

Unable to establish connection to database.

* Error information:
Microsoft JET Database Engine (0x80004005)
'U:\db\forcetrack.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

==============

If I cannot use that mapped drive to designate the exact location of the database -- which is where the DB is....I am not sure what the correct string should be.


I appreciate all of the info provided on this board.
View profile  Send private message
peterr


Posts: 5971
Posted: 07/27/2006, 3:25 PM

OK, now I understand where your database is located, and that the errors are different for each conifguration. This helps. In this case my answer would be:
AFAIK MS Access doesn't support remote/networked connections. I could be wrong about this, but if a similar connection string works OK on a local computer (and it does for me for example) then this is the proof that local connections work but remote/networked don't.

Thus the only solution that I see for now would be to move or copy your database to a local drive on your Web server. Then you can use the full database path on that server (like c:\database\forcetrack.mdb), or you can copy your database to a subfolder of where your Web application resides and then use MapPath with the subfolder name, like Server.MapPath("./db/forcetrack.mdb"), or possibly higher level folder would work as well, like Server.MapPath("../db/forcetrack.mdb")

_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.