MySQL db - data not saved (Using Frontpage ASP)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sam White

    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_Old CodePage") = Session.CodePag e
    Session("FP_Old LCID") = Session.LCID
    Session.CodePag e = 1252
    Err.Clear

    strErrorUrl = ""

    If Request.ServerV ariables("REQUE ST_METHOD") = "POST" Then
    If Request.Form("V TI-GROUP") = "0" Then
    Err.Clear

    Set fp_conn = Server.CreateOb ject("ADODB.Con nection")
    FP_DumpError strErrorUrl, "Cannot create connection"

    Set fp_rs = Server.CreateOb ject("ADODB.Rec ordset")
    FP_DumpError strErrorUrl, "Cannot create record set"

    fp_conn.Open Application("My SQL_ConnectionS tring")
    FP_DumpError strErrorUrl, "Cannot open database"

    fp_rs.Open "categories ", fp_conn, 1, 3, 2 ' adOpenKeySet,
    adLockOptimisti c, 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("Catego ryID")
    arFormFields0(1 ) = "CategoryNa me"
    arFormDBFields0 (1) = "CategoryNa me"
    arFormValues0(1 ) = Request("Catego ryName")
    arFormFields0(2 ) = "ID"
    arFormDBFields0 (2) = "ID"
    arFormValues0(2 ) = Request("ID")

    FP_SaveFormFiel ds fp_rs, arFormFields0, arFormDBFields0


    fp_rs.Update
    FP_DumpError strErrorUrl, "Cannot update the database"

    fp_rs.Close
    fp_conn.Close

    FP_FormConfirma tion "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.CodePag e = Session("FP_Old CodePage")
    Session.LCID = Session("FP_Old LCID")

    %>
    <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="SaveDataba se" SuggestedExt="a sp"
    S-DataConnection= "MySQL" S-RecordSource="c ategories"
    S-Form-Fields="Categor yID CategoryName ID" S-Form-DBFields="Categ oryID
    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="SaveDataba se"
    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>Category ID</b></td>
    <td><input type="text" name="CategoryI D" size="20"></td>
    </tr>
    <tr>
    <td><b>Category Name</b></td>
    <td><input type="text" name="CategoryN ame" size="20"></td>
    </tr>
    </table>
    <p><input type="submit" value="Submit" name="B1"><inpu t type="reset"
    value="Reset" name="B2"></p>
    </form>
  • Mike A.

    #2
    Re: MySQL db - data not saved (Using Frontpage ASP)

    On Sat, 24 Sep 2005 15:26:16 -0500, Sam White wrote:
    [color=blue]
    > 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...[/color]

    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! ;-)

    Comment

    • Sam White

      #3
      Re: MySQL db - data not saved (Using Frontpage ASP)

      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:[color=blue]
      > On Sat, 24 Sep 2005 15:26:16 -0500, Sam White wrote:
      >
      >[color=green]
      >>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...[/color]
      >
      >
      > 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! ;-)[/color]

      Comment

      Working...