asp database connection
- Started
- Last post
- 16 Responses
- CX
I am transporting an ASP site from one server to another. So all I have to do is change the path on my DatabaseConnect.asp include page to connect to the DB. It worked fine on the old server and on the new server when it was incorrect I had an error saying it was the wrong path.
So now I have what is supposed to be the right path and its still not working. The difference now is that there is no error message - the page just wont load.
If that is the correct path am I missing something?
- ********0
you check your security settings?
- tfs__mag0
personally i always use DSN connections... if it's not loading or giving you an error message of some sort i wouldn't have a great guess as to whats going on. you may want to see if the way your host sets up your site is different. some hosts use a www folder that you can see when you login via FTP... but if that were what was causing it it would give you the invalid path error.... hmmm i have no idea... mitsu might know though.
- ********0
you got me too
- mitsu0
do me a favor and right-click on the page in question and view source. look at the bottom of the source to see if there's an asp error. it should point out the problem.
- CX0
The SAs here gave me what they said was the correct path. It was slightly different than I thought it would be as mentioned. On a coworkers computer it was an H drive but in reality H equals E:/this/that.
I was wondering if IIS has setting like that you can turn on or off. Security could be an issue as the new server is a .mil.
- CX0
OK, mitsu, Ill login and do that.
- tfs__mag0
its stuff like this that makes me use DSN's for all my dbase connections.
- CX0
The page hangs when it finally loads and stops at right before the DB connection include line.
No errors under view source.
Is there something like Server.MapPath("file.mdb") I could use to ensure I have the correct path?
- mitsu0
ahhh, so it's hanging...
it's probably a permissions issue. your iuser is accessing the mdb file which then tries to create an ldb file in that same directory (for locking, etc). without the proper permissions on that folder, your connection attempt will just hang. talk to the administrator of that box and have them set your settings just like they were on the previous server. that should fix it.
- CX0
Thanks, dude. My friend just told me to ask you about that issue because he found some info about iuser_machinename settings.
Any specific settings to look for? I dont think the SAs are completely IIS saavy.
What about Server.MapPath("file")? Is that the correct way to get the path automatically?
Again, thanks a lot.
- mitsu0
using Server.MapPath is fine, but i gotta ask, why don't you just set up a dsn connection?
dsn-less connections are faster, but i don't think that really applies to access databases.
- CX0
I havent had any access to IIS as of yet. I've never used it before either. I started it that way with no problems (thought it would be as easy as changing a text string) but today its been a hassle.
So just tell them to look at the iuser permissions and make them the same?
- mitsu0
yeah, that would be the first step
- Nirvous0
DSN is always best I think.
Check your globals if you have pointers in there.
Make sure that you dont have read permissions off.
Is the computer turned on?
- CX0
Is that a joke or do you mean is the server on?
- Nirvous0
Kidding with you.