Update/Insert Record Wizard syntax error

Try using the Wizard update of records, I get the following error when you click the update button:

You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near 'Condition 'Very good' =, system = "related" ', Desc "=" Art and decoration July thru' at line 1
I get to the page for editing a page that displays all dbase, passing the index parameter to the update page when I click on a bound column index number. The update page appears full on the appropriate folder. It won't just accept the update button is clicked without generating the error, even if I make any changes at all to the record.

An almost identical error pops up just trying to open the page to insert a form created with the wizard insert a Record for this same table/dbase.

You have an error in your SQL syntax; consult the manual for your version of the MySQL server for the right syntax to use near 'State system 'Desc', price, weight, ThumbPic, library LargePic' at line 1

The mysql database update etc directly through php admin, but not through these pages of the wizard due to the error message. I have not modified any coding, just followed the instructions. I've done several of these pages Update and Insert before for other dbases and tables, so I have an idea of what I'm doing, but never confronted to this. This can be a problem with the syntax of one of my titles of rank or something to do with the structure of the dbase? Any ideas would be greatly appreciated? Thank you

I got it. Condition, one of my domain names and the first field mentioned in the error message is a reserved word in MySQL 5... Shortcut to the top name, cleaned the server behaviors for the new name of field and Update and Insert work very well.

Tags: Dreamweaver

Similar Questions

  • What is the use of refresh after Update/Insert in Wizard EO?

    Hello!

    What is the use of refresh after Update/Insert in Wizard EO? When I need it and when not?

    Thank you.

    -These checkboxes are for columns whose values change after that db triggers run.

    BR, 906099

  • When executing findServerBehaviors in Record2.htm insert, the following JavaScript error has occurred;

    I built a small web to test this http://www.kittydunes.info/test1.asp problem, which is working to get a simple record and produce results. I have just added using the insert record Wizard and created insert_record.asp. I get the following error message: lin 172 the file 'c:\program files\macromedia\dreamweaver8\configuration\serverbehaviors\shared\editoperations.js': type; checkboxeshash [z] .split is not a function

    Here is the code that was generated:

    I am new to DreamWeaver and work through various problems, but this one should have been by the book. Applications request and results to the db, which is MS Access 2003 works very well. I'm doing it without having to buy the extensions. If I could use some help. Please ask me for any additional info that a beginner has forgotten. Tim

    44211053 wrote:
    > I just added using the insert record wizard and created
    > insert_record.asp. I get the following error message: lin 172 of the file
    > "c:\program".
    > files\macromedia\dreamweaver8\configuration\serverbehaviors\shared\editoperation
    ' > s.js ': type; checkboxeshash [z] .split is not a function

    Try this:

    http://KB.Adobe.com/selfservice/viewContent.do?externalId=tn_19105&sliceId=1#dat

    --
    Adobe Community Expert David Powers
    Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
    Author, "PHP Solutions" (friends of ED)
    http://foundationphp.com/

  • Insert query syntax error

    I have a flash form that is used for inserts a record in an Access database table. In the because there are 4 datefields, several fields of text, and then on several fields. When I submit the form, I get a syntax error that reads:

    Running database query. [Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft Access driver] Syntax error in INSERT INTO statement.
    The error occurred on line 184. Complex object types cannot be converted to simple values.

    184 line is the last line of the values in the Insert query. The query looks like this:

    < CFQUERY DATASOURCE = '#REQUEST. DataSource #">"
    INSERT INTO EstimateNumber)
    BidNumber,
    Project,
    Construction,
    EstimatedBy,
    Region,
    Company,
    Division,
    InquiryNumber,
    SafetyChecklist,
    SafetyChecklistDate,
    QCChecklist,
    QCChecklistDate,
    EstimatedValue,
    UserUsername,
    UserPassword
    Updated,.
    ReviewDate,
    ReviewedBy,
    Discipline,
    BidDate,
    JobNumber,
    UpdatedBy
    )
    VALUES)
    #FORM. BidNumber #.
    ' #FORM. Project #',
    ' #FORM. Site #',
    ' #FORM. EstimatedBy #'.
    #FORM. Region #.
    #FORM.Company #,.
    #FORM. Division #.
    ' #FORM. InquiryNumber #'.
    #FORM. SafetyChecklist #.
    #FORM. SafetyChecklistDate #.
    #FORM. QCChecklist #.
    ' #FORM. QCChecklistDate #'.
    #FORM. EstimatedValue #.
    ' #FORM. UserUsername #',
    ' #FORM. UserPassword #',
    #FORM. # Update,
    #FORM. ReviewDate #.
    #FORM. ReviewedBy #.
    #FORM. Discipline #.
    #FORM. BidDate #.
    #FORM. JobNumber #.
    ' #FORM. "UpdatedBy #
    )
    < / CFQUERY >

    Any recommendations?

    chrispilie wrote:
    > Any recommendations?

    (1) enable debugging in order to visualize the generated actual query and post the SQL here
    (2) empty the form field. Are all of the form simple strings of values?

    (3) for the values inserted into a date/time column, you use cfqueryparam or CreateODBCDate, CreateODBCDateTime to convert the string to an object of good time. This ensures that the value is inserted properly

    Although I personally recommend to use cfqueryparam to subject parameters (not only date values).

  • Insert and update DB record problem

    I am writing a management tool that allows you to add a record and or update a record in my PB. I bought a text editor or a WYSIWYG editor and I'm trying to adapt it to my code. The form uses a few fields of the form with the editor as the last place to enter the content of the page. Right now all my content in the DB is displayed in the editor, I change the content and submit the form and he lost all the content in the editor, but keeps the content in the fields of the form. This is the code that I use and works for the fields of the form, but not the Editor:

    < cfelseif ParameterExists (Form.btnEdit_OK) >

    < ParameterExists (Form.RecordID) cfif >
    "< cfupdate datasource =" "#sitedatasource #" username = "#siteUserID #" password = "" #sitePassword # "tableName ="SEEevents"formFields =" #Form.FieldList # ">"
    < cflocation url = "events_RecordView.cfm? RecordID = #Form.RecordID # ">"

    < cfelse >
    "< cfinsert datasource =" "#sitedatasource #" username = "#siteUserID #" password = "" #sitePassword # "tableName ="SEEevents"formFields =" #Form.FieldList # ">"
    "< name cfquery ="GetNewRecord"datasource =" "#sitedatasource #" username = "#siteUserID #" password = "' #sitePassword # ' LignesMax = 1 >"
    SELECT SEEevents.ID AS ID_Field
    OF SEEevents
    ORDER BY SEEevents.ID DESC
    < / cfquery >
    < cflocation url = "events_RecordView.cfm? RecordID = #GetNewRecord.ID_Field # ">"

    < / cfif >

    This is the code to insert a file in the editor that comes with the Editor:
    < cfoutput query = "myContent" >
    < cfquery datasource = "db_example", dbtype = "ODBC" >
    Update sampleTable set sampleContent = ' #evaluate ("form. MyEditorName #myContent.contentID #") #'"
    where contentID = #myContent.contentID #.
    < / cfquery >
    < / cfoutput >

    Can someone help me to make this work? I'm perplexed and in a place that I need this job immediately.
    Help, please

    Thank you

    Phoenix

    Quote:
    Posted by: newsgroup user
    > Error executing database query.
    > [Macromedia] [SequeLink JDBC Driver] [ODBC Socket] [Microsoft] [ODBC Microsoft
    [> Access Driver] syntax error (missing operator) in query expression "{d
    {> ' 2007-04-13'} ".
    It seems that the error is with your eventDate. in MS Access, dates should be
    entered as # #date # (where date is a date in the format dd/mm/yyyy
    (or d/m/yyyy, according to the regional settings in the database). but there
    should be # 3 on both sides of the date and not '.
    then try changing your SEEevents.eventDate =' #form.eventDate #' to
    SEEevents.eventDate = #form.eventDate #.
    If that always generates an error, you must analyze your form date
    on the ground and make a date in the format MS Access to him first, before
    Add your
    ' mm/dd/yyyy') > and then use it in your query:
    SEEevents.eventDate = ###eDate #.

    This might work, but there are two ways to solve this specific problem. One is to use cfqueryparam and the other is to use createodbcdate. These methods do not work only with access, but with any other databases as well. In addition, you don't have to worry about your date format.

  • Record insertion form wizard

    'Record insertion form wizard' Dreamweaver creates this code on my page add_products.php

    1 <? php require_once('.. / Connections/connStore1.php');? >
    2 <? PHP

    4 //Alternative for PHAkt functions.inc.php
    5 require_once('.. / includes/tNG_functions.inc.php');

    7 //load the classes of tNG
    8 require_once('.. / tNG/KT_tNG.inc.php');

    Which causes this error message:

    Warning: main (.. / includes/tNG_functions.inc.php): failed to open stream: no such file or directory in /home/herm1/public_html/admin/add_product.php on line 5

    Fatal error: main(): failed to achieve "... / includes/tNG_functions." Inc.php' (include_path ='.: / usr/lib/php: / usr/local/lib/php ') in /home/herm1/public_html/admin/add_product.php on line 5


    Dreamweaver is indicative of the add_products.php to access a folder that does not exist.
    I'm stuck.

    Hi Yes,

    You must download includes it the folder that is created when you use the
    InterAKT extensions.

    "Herman2468" wrote in message
    News:e7mmi0$IC3$1@forums. Macromedia.com...
    > 'Record insertion form wizard' Dreamweaver creates this code in my
    > add_products.php page
    >
    1 >
    2 ><>
    >
    4 > //Alternative for PHAkt functions.inc.php
    require_once('.. > 5 / includes/tNG_functions.inc.php');
    >
    load > 7 classes of tNG
    require_once('.. > 8 / tNG/KT_tNG.inc.php');
    >
    > Which causes this error message:
    >
    > Warning: main (.. / includes/tNG_functions.inc.php): failed to open stream:
    > NO.
    > file or directory in /home/herm1/public_html/admin/add_product.php on
    > line
    5 >
    >
    > Fatal error: main(): failed to realize
    > '.. / includes/tNG_functions. Inc.php'
    > (include_path ='.: / usr/lib/php: / usr/local/lib/php ') in
    > /home/herm1/public_html/admin/add_product.php on line 5
    >
    >
    > Dreamweaver says add_products.php to access a folder that is not
    > exist.
    > I'm stuck.
    >
    >
    >

  • Error when I try to insert records ORA-01008:

    Hello

    Im trying to insert records from parameters with an immediate execution but idk what to try more so I ask for help, that's my statement inside the procedure:

    vSQL: = Q'{INSERT IN TESTQ

    (status, info, dt_entg, cd_prod, cd_fisc, cd_fabr, nm_fabr, cd_bar, cd_dist, nm_dist, cd_dist_ext, nm_dist_ext, nm_prod, cor, Manu, mater, prc_htec, peso, prc_tbl, st, custo_st, prc_cust, desc_prd, desc_esp, real, ideal, lc_v_p, estq)

    VALUES

    (: V_STATUS,: V_INFO,: V_DT_ENTG,: V_CD_PROD,: V_CD_FISC,: V_CD_FABR,: V_NM_FABR,: V_CD_BAR,: V_CD_DIST,: V_NM_DIST,: V_CD_DIST_EXT,: V_NM_DIST_EXT,: V_NM_PROD,: V_COR,: V_TAMN,: V_MATER,: V_PRC_HTEC,: V_PESO,: V_PRC_TBL,: V_ST,: V_CUSTO_ST,: V_PRC_CUST) (: V_DESC_PRD,: V_DESC_ESP,: V_REAL,: V_IDEAL,: V_LC_V_P,: V_ESTQ)}';

    EXECUTE IMMEDIATE vSQL;

    and returns this error ORA-01008:

    I already check the columns with the settings 29 even ive tried to use simple variable as 'V_CD_FABR' tried to use like this ": V_CD_FABR" im receives the value of a parameter in a procedure and by putting this value into a variable after attempts to insert the value of the variable.

    Thank you all!

    You must use the keyword

    execute immediate vsql using v_statu, v_info;
    

    Link: IMMEDIATE statement EXECUTION

  • Syntax error, insert "Expression AssignmentOperator" to complete the phrase

    Hi experts,
    I am very new to Java. Currently, I'm stuck with the exception of the program. Please help me understand what the problem is. The eclipse triggers the error "syntax error, insert"Expression AssignmentOperator"to complete the phrase" to the "exception; command"as the code below.

    Thank you
    Hieu

    Published by: user122479 on April 5, 2013 16:23

    Please add

    -tags around your code and the complete Stacktrace.
    
    bye
    TPD                                                                                                                                                                                
    
  • Change in the merger of insert and create a procedure for updating the records after

    Hello

    I have a table that contains about 50 M lines of partition, and every day I have an application that performs a merge to insert records statement about 100 k per day and it's 300 M updates a day.

    Because I both update and insert the application performs a merge.
    I need to make at least 500 M, updated day by day, and for this reason this solution doesn't have enough performance for what I'm asking.

    I think another solution that I will try to implement now, and I just posted this in an attempt to get help on the option that I may have to do.

    I want to start putting in place:
    -Locations is updated 'last_record_date' using 'KEY1' and 'Key2' "KEY3";
    -Change the application to only inserts into a temporary table.
    -Have two procedures, one that takes the new records from the temporary table and inserts it into the final table, and another that selects records which is updated and perform an update.
    -This two procedures will choose the records and delete them from the temporary table (or mark them as updated\inserted).

    The volume is very large, so performance is a challenge! That's why I'm writing this, because a solution with enough performance for the intermediate stage will be difficult.
    My final table is partitioned by date and the date is the area that I need to update (instead of create daily partitions in order to reduce the frequency of the movement of the line, I create monthly partitions)!
    It is currently my table definition:
    CREATE TABLE MY_TEST_TABLE
        (KEY1                           VARCHAR2(50 BYTE) ,
        KEY2                         VARCHAR2(50 BYTE) NOT NULL,
        KEY3                           VARCHAR2(50 BYTE) ,
        last_record_date                    VARCHAR2(50 BYTE) NOT NULL)
      PCTFREE     10
      INITRANS    1
      MAXTRANS    255
       STORAGE   (
        BUFFER_POOL DEFAULT
      )
      NOCACHE
      MONITORING
      ENABLE ROW MOVEMENT
      PARTITION BY RANGE (last_record_date)
      (
      PARTITION MY_TEST_TABLE_201112 VALUES LESS THAN ('20120101')
      PCTFREE     10
      INITRANS    1
      MAXTRANS    255
      NOLOGGING,
      PARTITION MY_TEST_TABLE_201201 VALUES LESS THAN ('20120201')
      PCTFREE     10
      INITRANS    1
      MAXTRANS    255
      NOLOGGING,
      PARTITION MY_TEST_TABLE_201202 VALUES LESS THAN ('20120301')
      PCTFREE     10
      INITRANS    1
      MAXTRANS    255
      NOLOGGING,
      PARTITION def VALUES LESS THAN (MAXVALUE)
      PCTFREE     10
      INITRANS    1
      MAXTRANS    255
      NOLOGGING
      )
      NOPARALLEL
    /
    
    
    
    -- Constraints for MY_TEST_TABLE
    
    ALTER TABLE MY_TEST_TABLE
    ADD CHECK ("KEY1" IS NOT NULL)
    /
    
    ALTER TABLE MY_TEST_TABLE
    ADD CHECK ("KEY2" IS NOT NULL)
    /
    
    ALTER TABLE MY_TEST_TABLE
    ADD CHECK ("KEY3" IS NOT NULL)
    /
    ALTER TABLE MY_TEST_TABLE
    ADD CONSTRAINT pk_MY_TEST_TABLE PRIMARY KEY (KEY1, KEY2, KEY3)
    USING INDEX
      PCTFREE     10
      INITRANS    2
      MAXTRANS    255
    /
    Thank you
    Ricardo Tomas

    naoseionome wrote:
    Hello

    My version is:
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production

    It's the DOF I used to create the database.

    The merger is common during every day for about 10 M records.

    There are several methods to do the update, but they do sequencially to avoid deadlocks (because I can't control the source and each process can update the same keys.

    The update uses "KEY1, KEY2, KEY3" to update the value 'LAST_RECORD_DATE' have impact by being date or varchar2?

    I'm still waiting to receive permissions in order to follow up the matter, but in the meantime, in that I am trying to implement this work around in order to accelerate a development in the case where it would be necessary! Comments only I have at the moment, it is that he is not able to process the total amount of records timely (order book is generated).

    Thank you
    Ricardo

    Well, the first thing we do is to change the type of data type varchar to a date. The main impact is that a date is not a string, it's a date. If you are adding data processes in different date formats (which is possible when you use a character to store information) you're going to be very sad (good luck converting back an effective date).

    An example of how this can happen easily.

    ME_TUBBZ?select to_char(sysdate) from dual;
    
    TO_CHAR(SYSDATE)
    -----------------------------
    12-jan-2012 10 55:33
    
    1 row selected.
    
    Elapsed: 00:00:00.01
    ME_TUBBZ?alter session set nls_date_format = 'yyyy-mon-dd';
    
    Session altered.
    
    Elapsed: 00:00:00.01
    ME_TUBBZ?select to_char(sysdate) from dual;
    
    TO_CHAR(SYSDATE)
    --------------------
    2012-jan-12
    
    1 row selected.
    
    Elapsed: 00:00:00.00
    

    Assuming that the client passes the column as an Oracle DATE will make an (implicit) conversion to store the data as a string, which will be based on the current settings of the NLS for the session. This allows also for someone to completely non-jour the information in the column (super bad). It's just really bad form to use strings to store dates, numbers, anything that is not naturally a string.

    Based on the description of your problem, I can't imagine how your partitioning scheme performs one action in another that require more work in order to process the updates (which are most of your needs). Partitioning does not equate to increase performance. It is a tool that, like every tool has its place, but I do not think that this is justified for what you do (certainly not how you currently use it anyway).

    I say no partitioning can not be useful for you, but I don't think that on the column that you are currently using is 'good '.

    Something I would like to personally study (must be able to compare this approach to your course, if you need parameters for comparison) if I were you would be using a Table Index organized for it. It will take more time to perform the operations insertion, but that is a small part of all the work that you do for this process. For updates, it should eliminate a lot of IO, assuming that you are doing an INDEX seek followed by a table access by ROWID to perform updates. This recommendation assumes that everything you said is true. You have 4 columns in your table, of which 3 are components of the primary key and the 4th is a date (note I did not string :)) and that you refresh mainly, not fit.) Also that you have no 'secondary' on this entity index (and none are needed).

    I would investigate this approach before the solution of temporary table that you are currently studying.

    See you soon,.

  • Comment of "Syntax error in INSERT INTO statement." validation error.

    I had this working perfectly on MySQL. Then I was told that I had to do with a mdb database in Access, now the errors pop up like crazy. I fixed all of them except this one, I get a "syntax error in INSERT INTO statement." When I try to post a comment on a post in my mini-blog site.

    The thing is, I use almost the same code for the comments I make blog themselves. The positions work fine, the comments are not.

    He said that the error is on my page addcomment_process as 119. It is the following (line 119 is underlined, bold line is also bolded in the error message):

    < name cfquery = "input_comments."

    DataSource = "" #DSN # ""

    username = "" #DSNUSER # ""

    password = "#DSNPASS #" >

    INSERT INTO (comments)

    speaker,

    Comment,

    DateTime,

    post_id

    )

    VALUES)

    "#form.commenter #"

    "#form.comment #"

    "#form.datetime #"

    "#form.post_id #".

    )

    < / cfquery >

    It is all fine data, by simply inserting not, because it says:

    "INSERT INTO comments (speaker, comment, datetime, post_id) VALUES ('Anonymous', 'test commentary.', 25 April 12 22:55 ', ' 2').

    It worked perfectly, when it was a MySQL database, now I keep getting errors present a part of the site now that it is MDB. Anyone know what is happening?

    DateTime is a reserved word in Access.

    --

    Adam

  • Behavior update record server breath error (its share of CS5.5 standard installation!)

    We do not expect that the code provided by a GREAT SOCIETY and CHIEF of TECHNOLOGY for WEB DEVELOPMENT to blow a mistake on one of the server behaviors, it provides as part of its standard installation. But then again, it is reality.  The UpdateRecord.js, located in your Windows 7 installation to... ProgramFiles (x 86(/Adobe Dreamweaver CS5.5/configuration/ServerBehaviors/Php_MySQL/UpdateRecord.js causes an error when it is selected from the SERVER BEHAVIORS menu.)  In this case, BEFORE you, I don't enter in the fields.  Error States: "while executing onLoad in UpdateRecord.htm, the following JavaScript error occurred: at line 687 of the file «...»» UpdateRecord.js': name has no property.  I looked at the code and it is beyond my comprehension.  Something about the NAME of a value in a list of nodes... I don't have the chops to go rewrite the code of Adobe.  If I did, I would make a lot of money.  Anyone know what to do about it? On my system: Windows 7, 64 bit, CS5.5 (on a lease is aware) using PHP and MySQL on a remote dedicated server running Apache under Linux.   : <) McFrisco

    OK, I've earned this spanking.  I was just frustrated.  Sorry for the rant.

    I managed to find a workaround on this.  There's really something wacky happening with Dreamweaver and the updated Disk Manager.  Here's what I did:

    How to make a DREAMWEAVER UPDATE RECORD writing.

    Dreamweaver Server for update record behavior doesn't work properly sometimes.  The symptom of this is that when you try to fill the popup form provided by the record of behaviors/setting menu item to update server, it you cannot choose the fields in the form to update the database if they are posted there by a previous page.  It only allows to choose if they are linked to the database.  It does no good, because you're updating a record with information from the database, you want to update, NO new information.  Kind of weird... But here's the way around.  Its a bit annoying but it works.

    1. on a clean, updated php page up a form with input fields corresponding fields of database, you want to update.  This page should be used as the page of RESULT of a form on a page where the update folder does not work because of conflicts, plugins or other unknown reasons.

    2. connect to the table of database that you want to update and put in place a recordset on the page.

    3 bind all the form fields to the correct database fields.

    4 make a behavior update record based on this form.  This in fact will not do anything but update registration with the stuff that's already in the file, as shown above.

    5 remove the php code that sets up the Recordset.  But, LET alone recording update code!  It is correct.

    6 change the bindings of all fields in the FORM to the variables $_POST [] is passed to the form on the previous page. (Make sure that the form of the previous page uses the POST, not the GET method).

    Now, when you submit the form it will go in the form values, which have been adopted since the form on the previous page.

  • Error when inserting Record with GoDaddy hosting

    When I try to insert a recording on a Web page hosted by GoDaddy in SQL server, I get the error:

    Microsoft OLE DB provider for ODBC error «80040e09» drivers

    [Microsoft] [ODBC SQL Server driver] [SQL Server] EXECUTE permission denied on object 'sp_execute', database 'master', owner 'dbo '.

    This error occurs on the line:

    MM_editCmd.prepared = true

    After some research online if I change the line following the error disappears, but the fact the behavior insert record:

    MM_editCmd.prepared = false

    Is it possible to change the behavior so that it will always use false instead of true and always appear as a behavior on the page.

    What happens in Dreamweaver 8.0.2. It happened not in Dreamweaver MX 2004.

    Thank you
    Mike

    After a lot of tinkering, I tried a test with a new table and web page. Dreamweaver has added the code to insert as before--the same code that causes the error. I tried the test and it worked. No error?

    The only difference I could think about was that the original array was created on a local SQL server server, and then I used generate the SQL Script for the create table statement, I then ran in on the SQL of GoDaddy Server Query Analyzer.

    I then removed the table and created through the user interface of GoDaddy and now it works. I don't know what the difference is, but at least it works.

    Thank you.

  • How to manage the update/insert in display with Outer Join object?

    Hello

    I have a problem in the treatment of update/insert in the original Version that contains two EOs with right outer join. The first EO values are inserted before and I want if second values EO already exists, it will update and if not a new record created.

    Error when I commit after entering values is: ' entity line with null key is not found in SecondEO. "

    What is the solution?

    Thank you

    Hello

    Make sure that your view object, you have included the key attributes of the two entity objects.

    Kind regards

    Saif Khan.

  • Problem inserting record using INSERT INTO

    I'm an amateur web by using the features of ColdFusion Builder to access an Access database information. I know very little about the ColdFusion syntax, but I use Dreamweaver CS3 to generate most of the code. I'm working on a page of the insert file to create a database of the user with the login information. I don't know what the problem is, but I get a syntax error referencing this particular part of the code:

    Syntax error in INSERT INTO statement.
    The error occurred in C:\ColdFusion9\wwwroot\Everett\register.cfm: line 22

    Here is the entire page with line 22 (referenced in the error message) in red. Any ideas?

    < cfset GetFileFromPath = CurrentPage (GetBaseTemplatePath ()) >
    < cfif IsDefined "(FORM. MM_InsertRecord") AND the FORM. MM_InsertRecord EQ 'register' >
    < cfquery datasource = "everettweb" >
    INSERT users ([name], [name], [Email address], password)
    VALUES (< cfif IsDefined ("FORM.first_name") AND #FORM.first_name # NEQ "" > "")
    < cfqueryparam value = "" #FORM.first_name # "cfsqltype ="cf_sql_clob"maxlength ="255">"
    < cfelse >
    ''
    < / cfif >
    , < cfif IsDefined ("FORM.last_name") AND #FORM.last_name # NEQ "" > "".
    < cfqueryparam value = "" #FORM.last_name # "cfsqltype ="cf_sql_clob"maxlength ="255">"
    < cfelse >
    ''
    < / cfif >
    , < cfif IsDefined ("FORM.email") AND #FORM.email # NEQ "" > "".
    < cfqueryparam value = "" #FORM.email # "cfsqltype ="cf_sql_clob"maxlength ="255">"
    < cfelse >
    ''
    < / cfif >
    , < cfif IsDefined ("FORM.password") AND #FORM.password # NEQ "" > "".
    < cfqueryparam value = "" #FORM.password # "cfsqltype ="cf_sql_clob"maxlength ="255">"
    < cfelse >
    ''
    < / cfif >
    )
    < / cfquery >
    < cflocation url = "register_success.cfm" >
    < / cfif >
    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > ""
    "< html xmlns ="http://www.w3.org/1999/xhtml"> <!-InstanceBegin template="/Templates/Main.dwt ' codeOutsideHTMLIsLocked = 'false'->
    < head >
    < link hand. CSS"rel ="stylesheet"type =" text/css"/ >
    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
    <!-InstanceBeginEditable name = "doctitle"-->
    Department of music < title > Everett, Everett, Massachusetts < /title >
    <! - InstanceEndEditable - >
    < style type = "text/css" >
    <!--
    {body
    background-color: #660000;
    }
    ->
    < / style >
    < script src = "SpryAssets/SpryMenuBar.js" type = "text/javascript" > < / script > "
    < script type = "text/javascript" >
    <!--
    function MM_preloadImages() {//v3.0
    var d = document; If (d.images) {if(!d.MM_p) d.MM_p = new Array();
    var i, j is d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i <.) Length; i ++)
    If (a [i].indexOf("#")! = 0) {d.MM_p [j] = new Image; d.MM_p [j ++] .src = a [i] ;}}
    }
    function MM_swapImgRestore() //v3.0 {}
    var i, x = offline. MM_sr; for (i = 0; a & & I <.) Length & & (x = a [i]) & & x.oSrc; i ++) x.src = x.oSrc;
    }
    function MM_findObj (n, d) {//v4.01
    var p, i, x;  if(!d) d = document; If ((p = n.IndexOf ("?")) > 0 & & parent.frames.length) {}
    d = parent.frames [n.Substring(p+1)] .document; n = n.Substring (0, p) ;}
    If (!) () x = d [n]) & & copyrights) x = d.all [n]; for (i = 0;! x & & i < d.forms.length; i ++) x = d.forms [i] [n];
    for (i = 0;! x & & d.layers & & I < d.layers.length; i ++) x = MM_findObj (n, d.layers [i] .document);
    If (! x & & d.getElementById) x = d.getElementById (n); Return x;
    }

    function MM_swapImage() {//v3.0
    var i, j = 0, x, a = MM_swapImage.arguments; document. MM_sr = new Array; for (i = 0; i <(a.length-2); I += 3).
    If ((x = MM_findObj (a [i]))! = null) {document. MM_sr [j ++] = x; if(!x.oSrc) x.oSrc = x.src; x.SRC = a [i + 2] ;}
    }
    ->
    < /script >

    <!-InstanceBeginEditable name = "head"->
    < script src = "SpryAssets/SpryValidationTextField.js" type = "text/javascript" > < / script > "
    < link href = "SpryAssets/SpryValidationTextField.css" rel = "stylesheet" type = "text/css" / > "
    < script src = "SpryAssets/SpryValidationConfirm.js" type = "text/javascript" > < / script > "
    < link href = "SpryAssets/SpryValidationConfirm.css" rel = "stylesheet" type = "text/css" / > "
    <! - InstanceEndEditable - >

    < link href = "SpryAssets/SpryMenuBarHorizontal.css" rel = "stylesheet" type = "text/css" / > "
    < style type = "text/css" >
    <!--
    a: link {}
    color: #660000;
    }
    a: visited {}
    color: #A01D22;
    }
    a: hover {}
    color: #FFCC00;
    }
    ->
    < / style >
    < link hand. CSS"rel ="stylesheet"type =" text/css"/ >
    < / head >

    < body = onload "MM_preloadImages ('menu_about_over', 'menu_ensembles_over.jpg', 'menu_schools_over.j pg', 'menu_events_over.jpg', 'menu_faculty_over.jpg', 'menu_contacts_over.jpg', 'menu_home_ove r.jpg ',' menu_about_over.jpg ',' menu_links_over.jpg ',' menu_login_over.jpg')" >

    < table width = "960" align = "center" border = "0" cellpadding = "0" cellspacing = "0" >
    < b >
    < td colspan = "3" > < img src = "top_border.jpg" width = "960" height = "20" align = "top" / > < table > "
    < /tr >
    < tr align = "center" >
    < td colspan = "3" > < a href = "index.php" > < img src = "e_oval_top.jpg" height = "100" width = "270" border = "0" / > < /a > < a href = "index.php" > < img src = "header.jpg" height = "100" width = "690" border = "0" / > < /a > < table >
    < /tr >
    < b >
    "< td height ="35"width ="301"> < a href ="index.php"> < img src =" e_oval_bottom.jpg"height ="35"width ="234"border ="0"/ > < /a > < a href =" # "MM_swapImgRestore" onmouseover = "MM_swapImage (" self "", 'menu_home_over.jpg', 1) "> < img src =" menu_home.jpg "width ="67"height ="35"name ="home"border ="0"id ="home"/ > < /a > < table >
    < td width = "251" > < ul id = "MenuBar1" class = "MenuBarHorizontal" >
    "< li > < a class ="MenuBarItemSubmenu"href =" # "MM_swapImgRestore" onmouseover = "MM_swapImage ('subject',", 'menu_about_over.jpg', 1) "> < img src =" menu_about.jpg"width ="71"height ="35"name = 'about' border ="0"id ="about"/ > < /a >"
    < ul >
    < li > < a href = "#" > News < /a > < /li >
    < li > < a href = "#" > story < /a > < /li >
    < li > < a href = "#" > media < /a > < /li >
    < /ul >
    < /li >
    "< li > < a class ="MenuBarHorizontal"href =" # "MM_swapImgRestore" onmouseover = "MM_swapImage (" sets ",", 'menu_ensembles_over.jpg', 1) "> < img src =" menu_ensembles.jpg"width ="98"height ="35"name = 'sets' border ="0"id ="sets"/ > < / has >"
    < ul >
    < li > < a href = "#" > Strip < /a > < /li >
    < li > < a href = "#" > Chorus < /a > < /li >
    < li > < a href = "#" > string < /a > < /li >
    < /ul >
    < /li >
    "< li > < a class ="MenuBarItemSubmenu"href =" # "MM_swapImgRestore" onmouseover = "MM_swapImage (" schools ",", 'menu_schools_over.jpg', 1) "> < img src =" menu_schools.jpg"width ="82"height ="35"name = 'schools' border ="0"id = 'schools' / > < / has >"
    < ul >
    < li > < a href = "#" > Everett High School < /a > < /li >
    < li > < a href = "#" > English School < /a > < /li >
    < li > < a href = "#" > Keverian school < /a > < /li >
    < li > < a href = "#" > School Lafayette < /a > < /li >
    < li > < a href = "#" > Parlin school < /a > < /li >
    < li > < a href = "#" > school Webster < /a > < /li >
    < li > < a href = "#" > Whittier school < /a > < /li >
    < /ul >
    < /li >
    < /ul >
    < table >
    "" "" < td width = "408" > < a href = "#" MM_swapImgRestore "onmouseover =" MM_swapImage ('events', ", 'menu_events_over.jpg', 1)" > < img src = "menu_events.jpg" width = height = "74" "35" name = 'events' border = "0" id = "events" / > < /a > < a href = "#" MM_swapImgRestore"onmouseover =" MM_swapImage ("Faculty",", 'menu_faculty_over.jpg', 1)" > < img src = "menu_faculty.jpg" width = height "79" = "35" name = "Faculty" border = "0" id = "Faculty" / > < /a > < a href = "#" MM_swapImgRestore "onmouseover =" MM_SwapImage ('links' "(,'','menu_links_over.jpg',1)" > < img src = "menu_links.jpg" width = "66" height = "35" name = 'links' border = "0" id = "links" / > < /a > < a href = "#" MM_swapImgRestore "onmouseover =" MM_swapImage ('login', ", 'menu_login_over.jpg', 1)" > < img src = "menu_login.jpg" name = "login" width = "69" height = "35" border = "0" id = "login" / > < /a > < a href = "#" MM_swapImgRestore"onmouseover =" MM_swapImage ('contact' ") (,'menu_contact_over.jpg',1) "> < img src =" menu_contact.jpg "width ="100"height ="35"name ="contact"border ="0"id ="contact"/ > < /a > < img src =" menu_spacer_end.jpg"width ="20"height ="35"/ > < table >"
    < /tr >
    < height '10' = tr >
    < td colspan = "3" > < img src = "menu_bottom_spacer.jpg" height = "10" width = "960" / > < table > "
    < /tr >
    < /table >
    < table width = "960" cellpadding = "0" cellspacing = "0" align = "center" >
    < height tr = "50" >
    < td width = "30" background = "left_border.jpg" > < img src = "clear.gif" width = "30" height = "50" / > < table > "
    < td width = "900" bgcolor = "#FFFFFF" >
    < table width = "900" cellpadding = "0" cellspacing = "0" >
    < b >
    < td width = "900" height = "350" valign = "top" > <!-InstanceBeginEditable name = "PageBody"->
    < form action = "" < cfoutput > #CurrentPage # < / cfoutput > "method ="POST"name ="registration"preloader =" "id ="registration">"
    < table width = "100%" >
    < b >
    < td colspan = "2" class = "title 1" > fill out the information below to register for this site: < table >
    < /tr >
    < b >
    < td colspan = "2" > < img src = "clear.gif" height = "15" / > < table > "
    < /tr >
    < b >
    < td width = "50%" class = "form" align = "right" > first name: < table >
    < td width = "50%" > < span id = "sprytextfield1" >
    < input type = "text" name = "FirstName" required = "Yes" id = "first name" width = "150" typeahead = "" showautosuggestloadingicon = "true" / >
    < span class = "textfieldRequiredMsg" > a value is required. </span > < / span > < table >
    < /tr >
    < b >
    < class td 'form' align = 'right' = > name: < table >
    < td > < span id = "sprytextfield2" >
    < input type = "text" name = "last_name" required = "Yes" id = "last_name" width = "150" typeahead = "" showautosuggestloadingicon = "true" / >
    < span class = "textfieldRequiredMsg" > a value is required. </span > < / span > < table >
    < /tr >
    < b >
    < class td 'form' align = 'right' = > E-mail address: < table >
    < td > < span id = "sprytextfield3" >
    < input type = "text" name = "email" validate = "email" required = "Yes" id = "email" width = "150" typeahead = "" showautosuggestloadingicon = "true" / >
    < span class = "textfieldRequiredMsg" > a value is required. </span > < span class = "textfieldInvalidFormatMsg" > Invalid format. </span > < / span > < table >
    < /tr >
    < b >
    < class td = 'form' align = 'right' > confirm E-mail address: < table >
    < td > < span id = "sprytextfield4" > < span id = "ConfirmWidget" >
    < input type = "text" name = "email_confirm" validate = "email" required = "Yes" id = "email_confirm" width = "150" typeahead = "" showautosuggestloadingicon = "true" / >
    < span class = "confirmInvalidMsg" > values do not match < / span > < / span > < / span > < table >
    < /tr >
    < b >
    < class td = 'form' align = "right" > password: < table >
    < td > < span id = "sprytextfield5" >
    < input type = "password" name = "password" required = "Yes" id = "password" width = "150" / >
    < span class = "textfieldRequiredMsg" > a value is required. </span > < / span > < table >
    < /tr >
    < b >
    < class td = 'form' align = 'right' > confirm password: < table >
    < td > < span id = "sprytextfield6" > < span id = "ConfirmWidget" >
    < input type = "password" name = 'password_confirm"required ="Yes"id = 'password_confirm' width ="150"/ >
    < span class = "confirmInvalidMsg" > values do not match < / span > < / span > < / span > < table >
    < /tr >
    < b >
    < td > < table >
    < td > < input name = "submit" type = "submit" id = "submit" value = "Save" / > < table >
    < /tr >
    < /table >

    < input type = "hidden" name = "MM_InsertRecord" value = "Save" / >
    < / make >
    < script type = "text/javascript" >
    <!--
    var sprytextfield1 = new Spry.Widget.ValidationTextField ("sprytextfield1");
    var sprytextfield2 = new Spry.Widget.ValidationTextField ("sprytextfield2");
    var sprytextfield3 = new Spry.Widget.ValidationTextField ("sprytextfield3", "email");
    var sprytextfield4 = new Spry.Widget.ValidationTextField ("sprytextfield4", "email");
    var sprytextfield5 = new Spry.Widget.ValidationTextField ("sprytextfield5");
    var sprytextfield6 = new Spry.Widget.ValidationTextField ("sprytextfield6");
    ->
    < /script >
    < script type = "text/javascript" >
    var ConfirmWidgetObject = new Spry.Widget.ValidationConfirm ("sprytextfield4", "email");
    var ConfirmWidgetObject = new Spry.Widget.ValidationConfirm ("sprytextfield6", "password");
    < /script >
    <!-InstanceEndEditable--> < table >
    < /tr >
    < /table >
    < table >
    < td width = "30" background = "right_border.jpg" > < img src = "clear.gif" width = "30" height = "50" / > < table > "
    < /tr >
    < b >
    < td colspan = "3" background = "footer.jpg' class = 'footer' height = '80'" / > this site best displayed using: < br / > < a href = "http://www.firefox.com" > < img src = "firefox_logo.gif" width = "110" height = "40" border = "0" / > < /a > < table > "
    < /tr >
    < /table >


    < script type = "text/javascript" >
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar ("MenuBar1", {imgDown: "..."}) "" / SpryAssets/SpryMenuBarDownHover.gif ', imgRight: ".. ({"/ SpryAssets/SpryMenuBarRightHover.gif"});
    ->
    < /script >
    < / body >
    <! - InstanceEnd - > < / html >

    Syntax error in INSERT INTO statement.  INSERT INTO Users ([First Name], [Last Name], [Email Address], Password)
    

    This oh-so-vague error is "Password" is a reserved word with your database driver.  Is it escape by putting brackets around it too, either rename the column permanently. It is best to avoid using reserved words where possible. To rename the column is the best option.  In addition, I try and avoid using invalid characters such as spaces in column names i.e. "first name". It is technically possible, but it requires special treatment everywhere that adds unnecessary complexity.

    I don't know what the problem is, but I get a syntax error referencing this particular part of the code:

    Do not take as gospel error line numbers. Sometimes, they simply indicate that the error is in the vincinty of this line.

    I use Dreamweaver CS3 to generate most of the code

    Unforutnately, DW assistants generate some really terrible and verbose code.  To give you an idea, here's what the query should look like, without all the nonsense of the wizard.

     

     

     

     

     


       

        INSERT INTO Users ([First Name], [Last Name], [Email Address], [Password])

        VALUES (

         

         ,

         ,

         ,

        )

     


      

    CF is fairly easy to learn. You can start browsing the CF documentation and some tutorials to familiarize yourself with the language. As you work with a database, I also recommend a SQL tutorial.

  • Need help writing an update / insert with linked tables

    I am new to ColdFusion. I am learning to write querys and creates a small application to collect information from visitors to my web site. (It's also a good way for me to learn this language) I'm having a problem and it is not only the way to use an update / insert with related tables. I don't know if I'm still gather the appropriate variables to compare them to existing DB records until his execution is the update or insert some querys. Can someone help me, show me how can I update / insert related tables and maybe tell me if I create the varibales good to the compairison? This is my code, I commented out.

    <! - creating a variable to compare with the db table - >
    < cfset userIP = ('#CGI.) REMOTE_ADDR #') >

    <! - run the query and compare the cfset cell remote_addr - >
    < name cfquery = 'userTracking' datasource = "" #APPLICATION.dataSource # "dbtype ="ODBC">"
    SELECT REMOTE_ADDR
    Of user_track
    WHERE REMOTE_ADDR = #userIP #.
    < / cfquery >

    <!-if the record exists, then run this update-->
    < cfif userTracking EQ userIP >
    < cfquery datasource = "#APPLICATION.dataSource #" >
    UPDATED user_track, trackDetail
    SET user_track. REMOTE_ADDR = < cfqueryparam value = '#Trim (CGI.' ' REMOTE_ADDR) # "cfsqltype ="CF_SQL_VARCHAR">.
    user_track. Browser = < cfqueryparam value = '#Trim (CGI.' "HTTP_USER_AGENT) #" cfsqltype = "CF_SQL_VARCHAR" >.
    user_track.visits = visits + 1,
    trackDetail.date = < cfqueryparam value = "#Now ()" # "cfsqltype ="CF_SQL_TIMESTAMP">,"
    trackDetail.path = < cfqueryparam value = "#Trim (PATH_INFO)" # "cfsqltype ="CF_SQL_LONGVARCHAR">"
    WHERE REMOTE_ADDR = < cfqueryparam value = '#Trim (CGI.' ' REMOTE_ADDR) # "cfsqltype ="CF_SQL_VARCHAR">
    < / cfquery >
    < cfelse >

    <! - if it isn't, then insert a new record-->
    < datasource = "" #APPLICATION.dataSource # cfquery "dbtype ="ODBC">"
    INSERT INTO user_track, trackDetail
    (user_track. REMOTE_ADDR, user_track.browser, user_track.visits, trackDetail.userID, trackDetail.date, trackDetail.path)
    VALUES)
    < cfqueryparam value = '#Trim (CGI.' ' REMOTE_ADDR) # "cfsqltype ="CF_SQL_VARCHAR">.
    < Len (Trim (HTTP_USER_AGENT)) GT 1 cfif >
    < cfqueryparam value = '#Trim (CGI.' "HTTP_USER_AGENT) #" cfsqltype = "CF_SQL_VARCHAR" >.
    < / cfif >
    visits + 1,
    < cfqueryparam value = '#Trim (CGI.' "HTTP_USER_AGENT) #" cfsqltype = "CF_SQL_VARCHAR" >.
    < cfqueryparam value = "" #user_track.userID # "cfsqltype ="CF_SQL_VARCHAR">,"
    < cfqueryparam value = "#Now ()" # "cfsqltype ="CF_SQL_TIMESTAMP">,"
    < cfqueryparam value = "#Trim (PATH_INFO)" # "cfsqltype ="CF_SQL_LONGVARCHAR">"
    )
    < / cfquery >
    < / cfif >


    I'm close on this? This throws any errors, but it is not no longer works. It is so obviously wrong. I get a cfdump the end of my query of compairison, but once it hits the stated case, it is lost.

    Thanks for your time no matter who.

    Newbie

    You must define the variable before you can use it.  You try to use it on line 1 of your model.

Maybe you are looking for