Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Migrating Access DB to new Webserver

Status
Not open for further replies.

jbusse

Programmer
Dec 17, 2002
4
US
I have recently begun moving my website from one hosting company to another. I have moved all of the files and databases. I have also setup Frontpage extensions on the new host. The webpages work correctly, but there is no link to the database.

This is the code I am having trouble with:
vStr = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Application("stuffdb")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open vStr

Where is "stuffdb" defined and how do I determine if the driver is active? How do I reassociate the database to the host without the benefit of having the Frontpage project files?


 
Open the web live on the remote server. Go to TOOLS > WEB SETTINGS/SITE SETTINGS > Click the Database tab.

Highlight the stuffdb - you should see it listed here, probably with a question mark next to it.
Click the Verify button - you should then see a check mark after it verifies the db connection.
Click the OK button to close the Dialog box.

Now go to TOOLS > RECALCULATE HYPERLINKS

That should ensure that your database connection is set up correctly on the new host.

Let us know if you have any problems after doing the above.

Tiffany


Microsoft MVP - FrontPage
 
Thank you for your response. Unfortunately, it did not work.

Configuration
Existing Website: Frontpage 6.0
Destination Website: FrontPage 2003 Extensions Installed
Developer Tool Used: FrontPage 2003

Steps Taken:
1.) I have cleared the destination website of all files, then reinstalled the FrontPage 2003 Extensions.
2.) I opened the existing website directly via the FTP option in FrontPage 2003.
3.) I then published the website from the existing website to the new website via HTTP within the FrontPage 2003 application.
4.) Tested. Did not work. So then I opened the destination website directly in FrontPage 2003 and performed the Site Settings / Recalculate procedure as outlined above.

The website published correctly and the site settings returned no errors, but still produced the HTTP 500 - Internal server error when accessing the ASP page containing a request from the MS Access database.

I am almost certain that the error is in the connection line of the below VBScript attached with the page in question. Unfortunately, rewriting the page is not really what I would like to do. Due to my limited knowledge of FrontPage 2003, I do not know how to add URL-passed parametes to a database query. There does not appear to be a way to do it. Here is the script currently in use:

<%@ LANGUAGE="VBSCRIPT" %>

<%
cString = ""

vStr = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Application("stuffdb")
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open vStr


If Request.Form("kind") = "Plastic" Then
vSQL = "SELECT recno,series_des,category,model,model_desc,composition FROM stuffView WHERE composition = 'plastic'"

IF Request.Form("R1") = "Residential" Then
vSQL = vSQL + " AND category LIKE '%Residential%' "
ELSEIF Request.Form("R1") = "Commercial" Then
vSQL = vSQL + " AND category LIKE '%Commercial%' "
ELSEIF Request.Form("R1") = "Healthcare" Then
vSQL = vSQL + " AND category LIKE '%Healthcare%' "
ELSEIF Request.Form("R1") = "Decorative" Then
vSQL = vSQL + " AND category LIKE '%Decorative%' "
ELSEIF Request.Form("R1") = "Specialty" Then
vSQL = vSQL + " AND category LIKE '%Specialty%' "
End if
...

Set RS = Conn.Execute(vSQL)
%>


The R1, R2, R3 and R4 variables are sent via a form on a previous page and the kind statement is URL-passed.

Your help is greatly appreciated.

Thanx!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top