MySQL & FP

R

Randy Morgan

My hosting provider offers ten MySQL databases per account, but only one
SQL db.

I've never done much with databases in websites, but I'm pretty sure I'm
going to need to do so for a new site. Since I have so many MySQL
databases at my disposal it seems I might want to work with them if
possible.

In searching the web I can't find much on whether MySQL and FP will play
well together, so I'm guessing that perhaps they won't.

Does anybody have any advice on whether I should invest time in this, or
am I going in the wrong direction.

Thanks.
 
K

Kevin Spencer

Chances are, if your hosting service is offering MySQL databases with your
hosting, they are running a non-Windows operating system, such as Linux or
Unix. If so, you will probably not be able to run ASP on your site, which is
what FrontPage uses to connect to databases. See if your site is hosted on a
Windows server.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Ambiguity has a certain quality to it.
 
R

Randy Morgan

I'm on a Windows server, but my host is telling me I can't access my
databases from FP:

+++
Thank you for contacting customer support.

Trying to connect to a database inside Frontpage is not allowed. That
would be a remote connection. The only way you can interact with our
databases is by using our SQL managers inside the Godaddy account, or by
uploading a script to our servers and running it. If you need to see
some of our sample database connection scripts, you can visit
http://ftphelp.secureserver.net/hosting_tutorial.html .
+++

Not being a db guy, I was counting on using FP to do its "magic" on all
this, so I've clearly got some work to do. But, I can run ASP.

Randy Morgan
 
R

Ronx

Databases in SQL Server and MySQL are managed using specific
applications - FrontPage is not such an application.
For SQL Server you would write an application using ASP or asp.NET (or
use the application provided by GoDaddy) to manage the database, for
MySQL hosts normally supply a PHP application - phpMyAdmin.
You will have to write your own scripts, or use the FrontPage Wizards,
to update or view the contents of the databases.
 
K

Kevin Spencer

There is a difference between connecting to a database "inside" FrontPage
(whatever that means - I assume it means connecting to a database USING
FrontPage) and using FrontPage to create web pages that connect to a
database. Your goal is to use FrontPage to develop web pages that connect to
a database on your web site, and that is certainly what you CAN do.
Otherwise, your hosting service would be providing databases for no purpose
whatsoever.

There are several components involved in connecting to a database. One is
the Connection String that the server-side app (in your case ASP or ASP.Net)
uses to create the software connection to the database. How you create the
Connection String can vary. It is simply a string of text in a text file,
usually your global.asa file.

Offhand, I'd say you got yourself a "low-cost" hosting service, which means
you're going to have to do a lot of stuff on your own, without all the
capabilities of FrontPage to create a database connection. Once you've
created your Connection, you can certainly build FrontPage ASP pages that
interact with the database. But you've got some self-education to do first.
I'm sure your hosting service has some materials that can help you learn
what you need to do and how.

If you're "not...a db guy" you're going to have to do one of 2 things:

1. Get ready to become one
2. Get a more expensive hosting service that provides all the bells and
whistles you need to not be one

Finally, I notice that your hosting service allows you to use an Access
database. This database will provide you with the smallest learning curve,
in terms of both setting up your Connection, and creating your
database-connective web pages using FrontPage. I would advise you to go with
Access for now.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
The sun never sets on
the Kingdom of Heaven
 
R

Randy Morgan

Thanks for the advice. I'm a little red-faced over this whole thing,
because I find myself sounding like one of my aunts, who fifteen years
ago said with a straight face "I want to get a computer and be really
good at it, but I don't want to learn how it works".

I'm prepared to spend some time getting to be at least a novice "db
guy", but just wanted to make sure I'm not going down a dry hole.
You're right, my hosting service is inexpensive, and I've hit a couple
of land mines with them already, most notably when I was told that I had
php support, but later found out that it's only php in safe mode.

I'll use Access and see where it leads me. Thanks again.

Randy Morgan
 
R

Randy Morgan

I'm back.

I made a page in my web to save form results to an Access database
instead of to a .csv file. I also made a page to display the contents
of the database after the forms are submitted.

It all works, and I'm pretty happy with it. If, however, that was the
end of the story I probably wouldn't be writing this, eh?

Here's my new challenge. When I used FP to make my original form (the
one that sent results to a .csv file) I wasn't happy with the form
validation available to me, so after much messing around I found a
JavaScript that started to do what I wanted. I don't know exactly how,
but I got FP to publish the site such that the script actually executed
before the form was submitted. What with all the ---webbot--- stuff
going on I don't know why it works, but it does.

When I copied this page (and gave it a .asp extension) and modified it
to use a form to hold results, I didn't change anything else, at least
not intentionally, but now the validation script does *not* run before
the form is submitted.

Here is the first part of the form code from the page that does work.
The function I want to run, which is in an external javascript file that
is linked in both pages, is called ValidateContactForm.

+++
<form method="POST" action="--WEBBOT-SELF--" name="ContactForm"
onSubmit="location.href='_derived/nortbots.htm';return false;"
webbot-onSubmit="return ValidateContactForm(); " onClick="return
checksubmit(this)">
<!--webbot bot="SaveResults" U-File="_private/contacts.csv"
S-Format="TEXT/CSV" S-Label-Fields="TRUE" startspan
B-Reverse-Chronology="FALSE" S-Date-Format="%m/%d/%y"
S-Time-Format="%I:%M %p" S-Builtin-Fields="REMOTE_NAME HTTP_USER_AGENT
Date Time" U-Confirmation-Url="registration_confirmation.htm"
B-Email-Label-Fields="TRUE" B-Email-Subject-From-Field="FALSE"
S-Email-Subject="Contact Form Submission" --><input TYPE="hidden"
NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" endspan
i-checksum="43374" -->
+++

Here is the equivalent code from the page that does *not* work:
<form method="POST" onSubmit="return ValidateContactForm();
"action="--WEBBOT-SELF--" name="ContactFormDB" onClick="return
checksubmit(this)">
<!--webbot bot="SaveDatabase" startspan
S-Builtin-Fields="HTTP_USER_AGENT REMOTE_HOST Timestamp REMOTE_USER"
SuggestedExt="asp" S-DataConnection="contact_dev"
S-RecordSource="Results" U-Database-URL="../fpdb/contact_dev.mdb"
S-Builtin-DBFields="Browser_type Remote_computer_name Timestamp
User_name" S-Form-Fields="Address1 Address2 AreaCode County City Email
Phone FirstName ZIPCode LastName State" S-Form-DBFields="Address1
Address2 AreaCode County City Email Phone FirstName ZIPCode LastName
State" U-ASP-Include-Url="../_fpclass/fpdbform.inc" --><input
TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include
file="../_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase" endspan
i-checksum="34604" -->
+++

The obvious difference is that in the page that does work FP prepended
"webbot-" before the onSubmit function. I tried to do the same thing in
Code View on the other page, but it didn't help.

Of course, if I view the source in the actual pages it doesn't look
anything like this because of way FP publishes. I could show that, too,
but wonder if anybody is still reading this.

Comments welcome!

Randy Morgan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top