|
| |
|
|
slincolnFELLERS
Posts: 59 Joined: 8/6/2004 From: Oklahoma City - OK Status: offline
|
DSN less Connection to Access DB on other Server - 1/24/2006 18:13:12
Okay, I'm in the final phases of a search form that I'm creating and I'm trying to connect my web form to an access database that resides on a different server than the web server. They are on the same LAN and the Web server is a (don't laugh please) NT 4 IIS 4.0 ... The server where the db resides is a Win2003. I tried adding the following to my code to a new spooky dieted page with db results: ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=" &Server.MapPath("I:\DBDEV\Files_DBXp.mdb") I also tried unc mapping of \\server\share\dbdev\Files_DBXp.mdb and it didn't like that either I'm almost thinking it would be easier just to create a task that copies the db to the web server twice a day, but the db is already 31MB... so if we can connect to the live db..it would be prefered. Thanks for any help.
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DSN less Connection to Access DB on other Server - 1/25/2006 9:25:12
I would think a DSN solution might be easier with IIS4. If you were running IIS 5 or greater, a virtual directory should work with proper permissions. (I don't believe IIS 4 supports this.) A DSN (IIRC anyways), should allow the web service to access it if you give the DSN appropriate permissions. Also, confirm that the appropriate permissions are applied to the DB file on the remote machine for the IUSR_machinename account. See this: http://support.microsoft.com/kb/169271/en-us Hope it helps.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
slincolnFELLERS
Posts: 59 Joined: 8/6/2004 From: Oklahoma City - OK Status: offline
|
RE: DSN less Connection to Access DB on other Server - 1/25/2006 10:45:22
Maybe I'm not setting the DSN up properly?? I'm running FP on my PC and so I have to set up the DSN on my PC. I configured the advanced portion with my network login account/psw. I set up a dsn on the web server with the exact same info. In FP, I can verify the connection, create a results DB from DRW and it seems to be reading it ok from there, but when I open the page from IE, I get this: Database Results Error [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot open the file '(unknown)'. It is already opened exclusively by another user, or you need permission to view its data. One or more form fields were empty. You should provide default values for all form fields that are used in the query. Which basically tells me it doesn't like the permissions...because I know no one else is using this DB (it's a dev) I'm not sure I understand how to give the iuser_machinename rights to that folder. On this server there is a iusr_s User that was created by IIS...but if I'm using a dsn with my login creds, it shouldn't even matter right? I've created an iusr_s user on the db server, but I need to confirm the passwords. I'll let you know what that does. If you think of anything else...let me know. Sam
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: DSN less Connection to Access DB on other Server - 1/25/2006 10:50:37
quote:
I'm running FP on my PC So your machine is the host? quote:
it shouldn't even matter right? Oh but it does. IUSR_machinename is the user when accessing the web with a browser. If it is on a LAN, 31 MB shouldn't take that long to copy over if you built a script. Using scripts, it only takes about 12 seconds on my 100 MB LAN.
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
slincolnFELLERS
Posts: 59 Joined: 8/6/2004 From: Oklahoma City - OK Status: offline
|
RE: DSN less Connection to Access DB on other Server - 1/25/2006 11:09:08
So what I'm hearing is...just copy the db to the webserver how ever many times a day and make it easy? Where does the webpage keep the dsn data? Is it in the global.x file or what? I tried giving iusr_s (user name on web server, created on db server) rights to the DBDev folder on the DB server, but that didn't work. I'd really rather not have to copy the db so to be in more of a real time environment. -S
|
|
|
|
slincolnFELLERS
Posts: 59 Joined: 8/6/2004 From: Oklahoma City - OK Status: offline
|
RE: DSN less Connection to Access DB on other Server - 1/27/2006 11:29:15
Well, that's didn't do anything...but I'm still not sure I've got everything set up right with my DSN and adding the name of my IUSR_XXX to the DB Server for permissions and all that. Have you seen any great detailed step-by-steps on how exactly to do that portion of it? -Sam
|
|
|
|
slincolnFELLERS
Posts: 59 Joined: 8/6/2004 From: Oklahoma City - OK Status: offline
|
RE: DSN less Connection to Access DB on other Server - 1/27/2006 11:50:08
Holy packville! I finally got it! I was setting the permissions on the Shared folder for the IUSR_S, but I hadn't set it for the actual SHARE... Once I did that...bingo. -S
|
|
|
|
maduko
Posts: 168 From: Tulsa OK USA Status: offline
|
RE: DSN less Connection to Access DB on other Server - 3/5/2006 9:37:35
So that solves it for two servers on your LAN. But what if I want to connect across the 'Net? MySQL supports using the IP address of the remote database server. Is there any equivalent for IIS?
|
|
|
|
maduko
Posts: 168 From: Tulsa OK USA Status: offline
|
RE: DSN less Connection to Access DB on other Server - 3/6/2006 12:53:59
Sorry to be so vague: Content page is on www.myfirstserver.com Database file resides on www.mysecondserver.com How does a script on my content page connect to the d/b on the second server?
|
|
|
|
slincolnFELLERS
Posts: 59 Joined: 8/6/2004 From: Oklahoma City - OK Status: offline
|
RE: DSN less Connection to Access DB on other Server - 3/6/2006 13:19:33
It might be best to start a new post on this question. But, if you've got it working on the main site, like connecting to a DB on the main site from the main site, it shouldn't be too difficult to point to the secondary site for db connection. But, like I say, I'd just start a new Discussion thread and see what the gurus think. -S
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|