Popular Searches: FrontPage Hosting | FrontPage Templates | FrontPage Training | Free FrontPage

Connecting to a database on another site??   Logged in as: Guest
  Printable Version
All Forums >>Taking FrontPage Further >>FrontPage and Databases >> Page: [1]
Name:
Message<< Newer Topic  Older Topic >>

Jimmy Crabb

Posts: 204
Member since: 10/15/2002
From: South Africa

Connecting to a database on another ... 

Hi

I am trying to create a site that will utilize the databases of another site (on the same server but with a diferent unique IP).

On the existing site, I create my connection strings in the globa.asa file like so:

Dim FrontPage_UrlVars(2)
'--Project Data Connection
Application("SalesCart1_ConnectionString") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/shop.mdb"
FrontPage_UrlVars(0) = "SalesCart1_ConnectionString"
Application("SalesCart1_ConnectionTimeout") = 15
Application("SalesCart1_CommandTimeout") = 30
Application("SalesCart1_CursorLocation") = 3
Application("SalesCart1_RuntimeUserName") = "xxxxxxx"
Application("SalesCart1_RuntimePassword") = "xxxxxxxx"
'--Project Data Connection
Application("Products1_ConnectionString") = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=URL=fpdb/products.mdb"
FrontPage_UrlVars(1) = "Products1_ConnectionString"
Application("Products1_ConnectionTimeout") = 15
Application("Products1_CommandTimeout") = 30
Application("Products1_CursorLocation") = 3
Application("Products1_RuntimeUserName") = "xxxxxxx"
Application("Products1_RuntimePassword") = "xxxxxxx"
'--


The question is - how do I modify these strings on a new site, to connect to the same Access databases?

I have tried amending the line "DBQ=URL=fpdb/shop.mdb" to read "http://www.newsite.com/DBQ=URL=fpdb/shop.mdb" but that doesn't work.

Can anyone help?


_____________________________

Any technology distinguishable from magic is insufficiently advanced.

http://www.absolutequartzcrystals.com
  Report Abuse |  Date: 11/16/2008 11:20:17 PM

TexasWebDevelopers

Posts: 7040
Member since: 9/24/2002
From: USA

RE: Connecting to a database on anot... (in reply to Jimmy Crabb

Hi Jimmy,

I don't use the FP webbots to do this (no global asa files to mess with) but you may run into some serious roadblocks and issues depending on how the server is configured. As long as the sites are on the same server, though, you have a chance of making this work. First of all, the DBQ URL bit is the path to the database inside your root web--it's configured to be relative to your root web folder so DBQ=URL=fpdb/shop.mdb" is the same as a path to your database. You can also express the path as an absolute reference to the server drive like C:\xw23o9l\www\site12\fpdb\shop.mdb

"http://www.newsite.com/DBQ=URL=fpdb/shop.mdb" won't work for so many reasons.
You might try "DBQ=URL=http://www.newsite.com/fpdb/shop.mdb" but I am sure you will find this won't work either for the simple reason that (1) your "path" is a URL instead of an absolute or relative path and (2) even if the URL worked, database folders are (usually) protected from folks just browsing into them and downloading the databases!!

So you need to write the connection strings (standard security) like this:
Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\fpdb\shop.mdb;Uid=Admin;Pwd=;
making sure the path is correct (this example will not work--I don't know your path)

You may have to be given a username/password for the database for the other connection string that is outside your root folder. The server Admin may also have to give some permissions server-side to allow this connection to function.

You'll have to ditch the FP webbots to do this.

As a side note, we often keep the database folders out of the root web for security. Your host might make this happen for you (don't count on it) but this allows the mutual connections to the DB to be scripted and secured more easily.


< Message edited by TexasWebDevelopers -- 11/20/2008 5:19:38 PM >



_____________________________



FrontPageTools.com:Templates, Tools and Training support this forum
  Report Abuse |  Date: 11/20/2008 5:16:15 PM
Page:   [1]
All Forums >>Taking FrontPage Further >>FrontPage and Databases >> Page: [1]
Jump to:

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



Forum Software powered by ASP Playground Advanced Edition 2.0.5
Copyright © 2000 - 2003 ASPPlayground.NET

0.03125