Hi all, Please excuse any ignorance I may show with this question - as I am not a programmer and I am trying to do something that is out of my experience. I feel truly out of my element in this and am hoping that the list expertise will help me. I have looked at the manual - but still am confused.
Basically, I am trying to set up forms using Microsoft FrontPage 2000 where the results (form input) will be sent to a database (Microsoft Access 2000) and to an email address. I am following instructions outlined in a Microsoft white paper which has specifically been written to address this topic (found at http://download.microsoft.com/download/fp2000/whitep/1/NT5XP/EN-US/cdonts200 0.EXE) My problem is that I can only get one form field value to be inserted into my table. I think I have followed the instructions that the white paper gives for building the mySQL string that is used to insert the form information into the database - but I am having no success in getting all the form information inserted into the databse. ---------------------------------------------------------------------------- ---------------------- The mySQL syntax given by the white paper is the following: mySQL = "INSERT INTO [your_table_name] " mySQL = mySQL & "([database_field_names]) " mySQL = mySQL & "VALUES ('[form_field_names]')" ---------------------------------------------------------------------------- ---------------------- The example mySQL string in the white paper is: mySQL= "INSERT INTO Employees " mySQL= mySQL & "(FirstName,LastName,Address,City,Region,PostalCode) " mySQL= mySQL & "VALUES ('" & Request.Form("FirstName") & "','" mySQL= mySQL & Request.Form("LastName") & "'" mySQL= mySQL & ",'" & Request.Form("Address") & "'" mySQL= mySQL & ",'" & Request.Form("City") & "','" mySQL= mySQL & Request.Form("Region") & "','" mySQL= mySQL & Request.Form("PostalCode") & "')" ---------------------------------------------------------------------------- ----------------------- The white paper gives the following my SQL syntax to help with customizing the SQL string: INSERT INTO [table] ([DBfield1],[DBfield2]) VALUES ('[form_field1]','[form_field2]') mySQL = "INSERT INTO [table] (DBfield) VALUES ('" & Request.Form("form_field") & "')" ---------------------------------------------------------------------------- -------------------------- Background: The Microsoft Access 2000 database table I want to insert information into is named Action The form field names or VALUES I am trying to insert information from (from the FrontPage 2000 form) are: RequestDate CommerceID LastName FirstName Email DepartmentNumber Sector StreetAddress City State ZipCode LocationCode MailDrop TelephoneNumber FaxNumber RequestType Library Request The Microsoft Access 2000 database table field names (to which I want to insert information into) are: RequestDate CommerceID Client FirstName Email DepartmentNum Sector StreetAddress City State ZipCode LocCode MailDrop TelephoneNum FaxNum ServiceName InternalGroup Request The form field values correspond to the table colums in the following way: RequestDate (value from form) insert RequestDate (database field name) CommerceID (value from form) insert into CommerceID (database field name) LastName (value from form) insert into Client (database field name) FirstName (value from form) insert into FirstName (database field name) Email (value from form) insert into Email (database field name) DepartmentNumber (value from form) insert into DepartmentNum (database field name) Sector (value from form) insert into Sector (database Field name) StreetAddress (value from form) insert into StreetAddress (database field name) City (value from form) insert into City (database field name) State (value from form) insert into State (database field name) ZipCode (value from form) insert into ZipCode (database field name) LocationCode (value from form) insert into LocCode (database field name) MailDrop (value from form) insert into MailDrop (database field name) TelephoneNumber (value from form) insert into TelephoneNum (database field name) FaxNumber (value from form) insert into FaxNumber (database field name) RequestType (value from form) insert into ServiceName (database field name) Library (value from form) insert into InternalGroup (database field name) Request (value from form) insert into Request (database Field name) ---------------------------------------------------------------------------- --------------------- What I have tried and the results: I have tried the following mySQL string - based on the example given in thw white paper (did not include all form fields as I wanted to see if it would work using the example given as a template). This string gave me error messages... mySQL= "INSERT INTO Action " mySQL= mySQL & "(RequestDate,CommerceID,Client,FirstName,Sector,Request) " mySQL= mySQL & "VALUES ('" & Request.Form("RequestDate") & "','" mySQL= mySQL & Request.Form("CommerceID") & "'" mySQL= mySQL & ",'" & Request.Form("Client") & "'" mySQL= mySQL & ",'" & Request.Form("FirstName") & "','" mySQL= mySQL & Request.Form("Sector") & "','" mySQL= mySQL & Request.Form("Request") & "')" I have also tried the following mySQL syntax to insert information into the database. This string correctly inserted information from the Request field in the form to the database Request field - but no information from the other form fields were inserted into their corresponding database fields. mySQL = "INSERT INTO Action (RequestDate) VALUES ('" & Request.Form("RequestDate") & "')" mySQL = "INSERT INTO Action (CommerceID) VALUES ('" & Request.Form("CommerceID") & "')" mySQL = "INSERT INTO Action (Client) VALUES ('" & Request.Form("LastName") & "')" mySQL = "INSERT INTO Action (FirstName) VALUES ('" & Request.Form("FirstName") & "')" mySQL = "INSERT INTO Action (Sector) VALUES ('" & Request.Form("Sector") & "')" mySQL = "INSERT INTO Action (Request) VALUES ('" & Request.Form("Request") & "')" How do I structure the synatx so that information from the other form fields are inserted into their corresponding database fields?? I have the feeling the answer is in the punctuation ... Please help! You may respond directly to me at [EMAIL PROTECTED] if you wish. Best Regards, Don email: [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php