473,386 Members | 1,886 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

MySQL db - data not saved (Using Frontpage ASP)

I have set up a MySQL db on one server, IIS 6.0 on another. Using
Frontpage I created some forms to input data. On a test page I made, I
have 4 fields. First is the ID which is autonumber (I leave alone). The
second is marked as TEXT, the third is MEDIUMTEXT, and the fourth is
DATE. This is just an example though, the problem exists in no matter
what manner I create the form.

Now here is the issue. In the TEXT fields nothing is saved into the db.
But whatever I put in the DATE field is saved. I played around a bit and
found if I put in a single letter (a for example) it will be saved in
the TEXT fields. If I put in "aa" it will not save.

Now if I create a form that is to accept just 4 fields of a numbers the
form will work properly. I.e. a form made for inputing IP addresses and
telephone numbers will work. Once I add a field for a name then the form
will only save the number.

Yet in the db itself I have no issues putting in long text phrase into
the same field (Using OpenOffice). Therefore I assume this is some issue
on how either Frontpage created the form or the webserver is sending the
data. Is there anything special I need to do to get a from made with
Frontpage to work with MySQL db? I have made numerous forms to use a MS
Access db without any issue.

Below is the code used for a test page-

<%
' FP_ASP ASP Automatically generated by a Frontpage Component. Do not Edit.

On Error Resume Next
Session("FP_OldCodePage") = Session.CodePage
Session("FP_OldLCID") = Session.LCID
Session.CodePage = 1252
Err.Clear

strErrorUrl = ""

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
If Request.Form("VTI-GROUP") = "0" Then
Err.Clear

Set fp_conn = Server.CreateObject("ADODB.Connection")
FP_DumpError strErrorUrl, "Cannot create connection"

Set fp_rs = Server.CreateObject("ADODB.Recordset")
FP_DumpError strErrorUrl, "Cannot create record set"

fp_conn.Open Application("MySQL_ConnectionString")
FP_DumpError strErrorUrl, "Cannot open database"

fp_rs.Open "categories", fp_conn, 1, 3, 2 ' adOpenKeySet,
adLockOptimistic, adCmdTable
FP_DumpError strErrorUrl, "Cannot open record set"

fp_rs.AddNew
FP_DumpError strErrorUrl, "Cannot add new record set to the database"
Dim arFormFields0(3)
Dim arFormDBFields0(3)
Dim arFormValues0(3)

arFormFields0(0) = "CategoryID"
arFormDBFields0(0) = "CategoryID"
arFormValues0(0) = Request("CategoryID")
arFormFields0(1) = "CategoryName"
arFormDBFields0(1) = "CategoryName"
arFormValues0(1) = Request("CategoryName")
arFormFields0(2) = "ID"
arFormDBFields0(2) = "ID"
arFormValues0(2) = Request("ID")

FP_SaveFormFields fp_rs, arFormFields0, arFormDBFields0
fp_rs.Update
FP_DumpError strErrorUrl, "Cannot update the database"

fp_rs.Close
fp_conn.Close

FP_FormConfirmation "text/html; charset=windows-1252",_
"Form Confirmation",_
"Thank you for submitting the following information:",_
"1.asp",_
"Return to the form."

End If
End If

Session.CodePage = Session("FP_OldCodePage")
Session.LCID = Session("FP_OldLCID")

%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>ID</title>
</head>

<body>

<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveDatabase" SuggestedExt="asp"
S-DataConnection="MySQL" S-RecordSource="categories"
S-Form-Fields="CategoryID CategoryName ID" S-Form-DBFields="CategoryID
CategoryName ID" U-ASP-Include-Url="_fpclass/fpdbform.inc" startspan
--><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--#include
file="_fpclass/fpdbform.inc"--><!--webbot bot="SaveDatabase"
i-checksum="40548" endspan -->
<p> </p>
<table border="1" width="100%" id="table1">
<tr>
<td><b>ID</b></td>
<td><input type="text" name="ID" size="20"></td>
</tr>
<tr>
<td><b>CategoryID</b></td>
<td><input type="text" name="CategoryID" size="20"></td>
</tr>
<tr>
<td><b>CategoryName</b></td>
<td><input type="text" name="CategoryName" size="20"></td>
</tr>
</table>
<p><input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2"></p>
</form>
Sep 24 '05 #1
2 3429
On Sat, 24 Sep 2005 15:26:16 -0500, Sam White wrote:
I have set up a MySQL db on one server, IIS 6.0 on another. Using
Frontpage I created some forms to input data. ... This is just an
example though, the problem exists in no matter what manner I create the
form...


Try creating an example form in OpenOffice - it will create html files. I
don't know about its ability to create ASP's, though. I prefer to develop
using .cgi or .php over .asp.

I think what you are experiencing is one of MS's unadvertised 'features' -
vendor lock-in. Notice how it works when EVERYTHING involved comes from
MS?

Apache, PHP, perl, and OpenOffice are all available (for free) for
Windows, but I would set the whole thing up to run on Linux or FreeBSD and
run completely sans Microsoft.

Ever hear of the LAMP stack? Linux, Apache, MySQL, PHP. Very popular,
and works well. You could run it on Windows, then it would be WAMP. You
may even be able to get away with IIS instead of Apache - ha ha, then it
would be WIMP! ;-)
Sep 25 '05 #2
I think you are absolutely correct in that this is another example of
MS's unadvertised features. I know from past that SQL server has no
issues with Frontpage, but MySQL seems to be a different issue. And
there is not a chance in hell I will switch to that resource hog called
SQL server. I have a MySQL db that is now twice what it was when it was
in SQL, and yet uses less memory.

I have looked all over the internet and the closest I could find is
another person back in 2004 who had the same issue but there were no
responses.

I do have openoffice and in fact tried to use that without success.
Basically without programming knowledge of any kind I was trying to set
up forms to update and input data into a db from the web. I think at
this point I am going to look at PHP. There is some software out there
that is supposed to make these forms for you (for code clueless people
like me), but none of the software works at all. ASPRunner doesnt even
bother to generate most of the needed files, what a joke.

Mike A. wrote:
On Sat, 24 Sep 2005 15:26:16 -0500, Sam White wrote:

I have set up a MySQL db on one server, IIS 6.0 on another. Using
Frontpage I created some forms to input data. ... This is just an
example though, the problem exists in no matter what manner I create the
form...

Try creating an example form in OpenOffice - it will create html files. I
don't know about its ability to create ASP's, though. I prefer to develop
using .cgi or .php over .asp.

I think what you are experiencing is one of MS's unadvertised 'features' -
vendor lock-in. Notice how it works when EVERYTHING involved comes from
MS?

Apache, PHP, perl, and OpenOffice are all available (for free) for
Windows, but I would set the whole thing up to run on Linux or FreeBSD and
run completely sans Microsoft.

Ever hear of the LAMP stack? Linux, Apache, MySQL, PHP. Very popular,
and works well. You could run it on Windows, then it would be WAMP. You
may even be able to get away with IIS instead of Apache - ha ha, then it
would be WIMP! ;-)

Sep 26 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JStrummer | last post by:
I currently have an ASP website that utilizes an Access database, which I administrate through the web via aspaccess. I really would like to have a better database, but I can't afford to own SQL...
3
by: Jennifer | last post by:
Hi. I don't know a whole bunch about html and asp pages, but I thought I'd give it a try to see if I could get it to work. I found an example for a calendar event page from Microsoft at: ...
0
by: NewbieSupreme | last post by:
I'm using PHPMyAdmin on an Apache2Triad install (latest version; 5.x.x, which installs PHP5 and PHPMyAdmin 2.8 as well). In Access, I exported a table to a text file, tab-delimited, text qualifyer...
0
by: ariskot | last post by:
Hi. I'm having a problem with a site that worked fine up to now, but they just upgraded to the new SUN Chilisoft ASP version. It used to work fine and I can still read data, but I can't write...
3
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
1
by: vinodkus | last post by:
HV TAKEN A DRON DOWN AND FETCH RECORD OF THREE COLUMN FROM A TABLE, AND I HAVE TAKEN A SUBMIT BUTTON.JUST I WANT TO SHOW ALL RECORD IN NEXT PAGE JUST SPLIT THEM AND STORIN IN AN ARRAY BUT IT GIVES...
9
by: =?iso-8859-1?B?Sm/jbyBNb3JhaXM=?= | last post by:
Hi there guys, My doubt is related with MySQL and Transactions (InnoDB) so here it goes: I have a query like this: $query = 'START TRANSACTION; '; $query .= 'UPDATE sections '; $query .=...
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
5
by: MeeMee | last post by:
Hi I have a problem with saving form data to a MS Access database. I am using Windows XP, FrontPage 2003, Access 2003, IIS 5.1 and FrontPage Server Extensions. I have followed several tutorials...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.