Re: Connecting to a database in a different server
From: Jack (Jack_at_discussions.microsoft.com)
Date: 02/09/05
- Next message: mukesh bhakta: "0x8004E005 and 0x80004005 COM Errors - Please help"
- Previous message: Mark Schupp: "Re: Connecting to a database in a different server"
- In reply to: Mark Schupp: "Re: Connecting to a database in a different server"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 9 Feb 2005 14:47:10 -0800
Thanks Mark, I will try to avoid Server.MapPath method in the current
situation and check on your advise regarding the proper location of the
database. Regards.
"Mark Schupp" wrote:
> MapPath cannot resolve a path on another server. As mentioned in the article
> you must know the physical directory structure on the other server in order
> to connect to a database on it. You should also review (preferably with
> whoever requires that the database reside on a different server) the
> comments about why this is not a good idea.
>
> --
> --Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
> "Jack" <Jack@discussions.microsoft.com> wrote in message
> news:B20A65EA-4179-41B5-93CA-6CA8095E5B9A@microsoft.com...
> > Thanks again Bob. I read the article as suggested by Joe. However, I could
> > not understand it fully. My confusion is "How to use Server.MapPath to get
> > connection to a different server? Here
> > Server.MapPath("/gwis/GMISDATA.mdb") automatically refers to the current
> > web
> > server. How would the above code be modified? Do I need to know the server
> > name or ip address where the database exists to incorporate it in the code
> > of
> > Server.MapPath? Regards
> >
> > "Bob Barrows [MVP]" wrote:
> >
> >> Jack wrote:
> >> > Hi,
> >> > I can successfully connect to a database located in the same server.
> >> > I am using the following code to connect to a database located in the
> >> > same directory as the web application, gwis.
> >> >
> >> >
> >> > myDSN="DRIVER={Microsoft Access Driver (*.mdb)}; " & _
> >> > "DBQ=" & Server.MapPath("/gwis/GMISDATA.mdb")
> >>
> >> First problem. Use OLE DB instead of ODBC:
> >>
> >> myDSN="Provider=Microsoft.Jet.OLEDB.4.0; & _
> >> "Data Source=" & Server.MapPath("/gwis/GMISDATA.mdb")
> >> >
> >> > However, the database needed to be moved to a different webserver
> >> > from the application server. With this move, I have no idea how to
> >> > handle the connectivity.
> >>
> >> Joe cited http://www.aspfaq.com/show.asp?id=2168
> >> Didn't this help?
> >>
> >> Bob Barrows
> >> --
> >> Microsoft MVP -- ASP/ASP.NET
> >> Please reply to the newsgroup. The email account listed in my From
> >> header is my spam trap, so I don't check it very often. You will get a
> >> quicker response by posting to the newsgroup.
> >>
> >>
> >>
>
>
>
- Next message: mukesh bhakta: "0x8004E005 and 0x80004005 COM Errors - Please help"
- Previous message: Mark Schupp: "Re: Connecting to a database in a different server"
- In reply to: Mark Schupp: "Re: Connecting to a database in a different server"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|