Re: Connecting to a database in a different server

From: Jack (Jack_at_discussions.microsoft.com)
Date: 02/09/05


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.
> >>
> >>
> >>
>
>
>



Relevant Pages

  • Re: Problems with tempdbs with IDS 9.30 UC1 and RedHat 7.1
    ... The database was imported ... Best regards ... Superboer schrieb: ... run that on your old server and new server. ...
    (comp.databases.informix)
  • RE: Please suggest server configuration
    ... Mark pretty much beat me to the punch but... ... How intense are the hits to the database? ... If everything is small enough it could all be on one server and still easily ... We want the server configuration to support 40 simultaneous user sessions. ...
    (RedHat)
  • Re: SMTP Inbound Mail Problem ?
    ... I have generated a trace, what should I look for that would indicate a block ... Regards ... Mark ... > something is preventing the mail from making it to the server. ...
    (microsoft.public.exchange.connectivity)
  • RE: Copy Server problems
    ... Sorry Mark - I cannot use the transfer database task since it detaches the ... information from the linked server and local server togther at same time. ...
    (microsoft.public.sqlserver.dts)
  • Re: Step-by-step Win 2k3 sever setup
    ... >> Installing Windows Server 2003 is easy, ... >> The pressing issues are what do you want to do with the server. ... >> Regards, ... >>> Mark ...
    (microsoft.public.windows.server.setup)

Loading