Insert into array function

Hello,
How can I add an element to a specific location of an array (row 3 and column 4 for example)?  I can only wire one index input into Insert Into Array function.  
Thanks 

If you're trying to replace an existing element, then you should use Replace Array Subset, not Insert Into Array.
You cannot insert a single element into a 2-D array, because LabVIEW doesn't know how to shift the rest of the array to account for the gap that would appear if you were to do that. If you actually want to insert (and not replace), into a 2D array, then you need to insert an entire row or column, not a single element.

Similar Messages

  • Which index values can be sent to "Insert Into Array" without changing the present array ? E.g. index -1 ?

    Which index values can be sent to "Insert Into Array" without changing the present array ? E.g. index -1 ?
    Could not find this info via the "Context Help" window.

    If you have to handle situations where you do not want to insert something in an array, then you can either use a negative index value as you suggested, or put the insert node in a case structure, with the "do not insert" case empty (almost...just crossed by the array wire!..)
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • How to skip certain lines for a txt file and insert into array

    so here is my question:
    i had a file to read, and it requires to input into the array starting from a certain line
    example:
    4
    john 25 M
    mary 22 F
    lee 20 M
    faye 10 F
    faye john
    mary john
    mary faye
    i want to insert the friend list, starting 5th line into a 2d array, which is the int from first line +1.
    can someone help me with it?
    i believe there is a skip method and stuff..
    but just dont know how to use it
    may someone tell me how to do tat?

    the thing is i think that takes too long and it is not efficient..
    however...i just solved it with a better method
    Scanner in = new Scanner (reader);
    int size = Integer.parseInt(in.next());
    BufferedReader insert = new BufferedReader(new FileReader(new File(input)));
    String line = null;
    int count = 0;
    int startAtLineNo =size+1; // 0-based
    while ((line = insert.readLine()) != null) {
    if (count >= startAtLineNo) {
    /* do stuff */
    System.out.println(line);
    // else ignore
    count++;
    thanks anyways

  • PHP create array/variable for two dropdowns and insert into one column

    Hello,
    I have been trying for days to get this to work. Any help would be very appreciated.
    The dropdown code:
    <?php //Dropdowns for hours and minutes
    $hour = array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
    $min = array (.00, .25, .50 ,.75);
    echo '<span class="red">Hours :</span><select name="hour">';
    foreach ($hour as $value1) {
    echo "<option value=\"$value1\">$value1</option>\n";
    echo '</select>';
    echo '<span class="red">Quarter Hours :</span><select name="min"';
    foreach ($min as $value2) {
    echo "<option value=\"$value2\">$value2</option>\n";
    echo '</select>';
    //Dropdowns for hours and minutes
    //Create variable to send to the time field using a hidden field
    function input_time($value1, $value2) {
    $time = count($value1 + $value2);
    return $input_time;
    ?>
    <input name="time" type="hidden" value="<?php echo "$input_time";?>" />
    The Schema:
    CREATE TABLE `ND_time_sheet` (
      `time_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `day` varchar(10) NOT NULL DEFAULT '',
      `date` varchar(8) NOT NULL DEFAULT '',
      `project_id` varchar(8) DEFAULT NULL,
      `non_bill` tinytext,
      `staff_id` varchar(5) NOT NULL DEFAULT '',
      `time` decimal(3,2) unsigned zerofill DEFAULT NULL,
      `type` varchar(30) NOT NULL DEFAULT '',
      PRIMARY KEY (`time_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1
    Thanks!

    9677670421 wrote:
    hi... i am trying to do the same but i am having the 2D array of data when first time if i clicked in table it should show the the first row values and if i again clicked same value should show in the second row and so on... but insted in my code if clicked (using insert into array ) at a time it is showing two rows of the data pl help me ..........
    This seems to be a different problem, so you should have started a new thread instead.
    Can you show us your code, tell us what you are clicking, tell us what you get and what you expect to get instead. Thanks.
    LabVIEW Champion . Do more with less code and in less time .

  • Can't insert 1d array of DBL into 2d array

    I've got a program which calculates resistances given measured resistances and a temperature range.  It generates a 2d array of results (temperature and resistance) which is two columns wide and about 510 rows long.  I'm trying to write something that will take that array as input and write a new 2d array that's ten columns wide, 51 rows long, and has only the resistance values.  I've managed to write a loop that reads ten values from the resistance column and puts them in a 1d array, but whenever I try to insert the 1d array into a 2d array in another loop to handle the rows, I get an error message about connecting arrays of differing dimensions.  I've tried both "Replace subset" and "Insert into array" but they both give me the same message.
    I'm using a shift register to make sure the final array is used in each loop iteration (so I'm always adding a row to the same array).  I tried using "Build Array" but that only overwrites the first row over and over again.
    I've tried searching the forums for a solution but I haven't been able to open any of the demo vi's because I'm using 8.0.1 and most of the demos are written in a later version.  Help?
    Attachments:
    array.PNG ‏41 KB

    LOL!!
    LOL!!
    sorry...
    LOL!!! 
    You can't do that... Looping back like that is just not right!  LOL!!!  You'd be pulling a time warp!  LOL!!
    sorry...  it's a little funny...   Thanks, I actually needed to laugh a bit..  LOL!! 
    Even if you could loop back, you're actually looping back a 1D array, so at the top, you still don't have a 2D array, which does not solve the original error.
    Message Edited by JoeLabView on 12-06-2007 03:37 PM
    Attachments:
    badArrayBackLoop.PNG ‏4 KB

  • I want to insert 2d array (XY position)t​o XY graph and can delete the data from the array too.

    Firstly, I receive the data of X and Y position one by one seperately and then I add this two value (numeric double) to array two column (XY). After I press ok button the new data for X and Y will come and be added to the last row of my data. Then I use this data to plot in XY graph. All of this I did it already, but I want more additional function.
    My additional function is I want to add or delete a pair of data XY from the array at the row that I defined. This one I can not do it.....

    You use the Insert Into Array and Delete From Array functions on the Array palette. Here's a simple example in 6.0 that shows how they're used.
    Attachments:
    Insert_and_Remove_Row.vi ‏50 KB

  • Is there any way to create a circular buffer using the INSERT ARRAY function?

    I saw the example using the REPLACE ARRAY function, but it uses too much CPU power on my laptop. I'm using it for a very sensitive application and saw that the INSERT ARRAY function used much less CPU power.
    I am also not wiring the index on the INSERT ARRAY function so that whatever is read from the buffer is added to the array.
    However, since it is not indexed, I don't know how to set the "write" index back to 0 when it reaches a certain sized array (ie 1000 elements). I was looking for an array property node, but couldn't figure out if one exists for the "current write index".
    Can anyone help?
    Thanks

    I will try to answer this question to my best understanding. I apologize if I interpreted the question wrong.
    You are using the "Insert Array" vi without wiring the index. By doing that, new elements will be added (appended) to the array.
    If you just want to know the current index to stop your acquisition when the array reach certain amount of elements, then you can use the "Array Size" vi to keep track of the size of the growing array. Remember that Array Size = last index + 1 because the index start at zero.
    A second option is that you may want to start over the array when it hits the maximum number of elements that you will allow. If that's the case, then you may want to re-initialize the array to a NULL state by stablishing a condition (for example, when the
    size of the array is 1000, re-initialize). I provided an example attached to this message showing how this can be accomplished. In the example, an 1D array grows in size using the "Insert Array" vi and inserting a random number. When the array reach 4 elements, it is re-initialized. You can expand this example by saving the array first to a file or some other holder before re-initializing the array. The example is in LabVIEW 6.
    Finally, if you want to replace the current values with new values, I think you do not have other choice but to use the "Replace Array" vi.
    Hope this can be of help.
    Regards;
    Enrique Vargas
    www.vartortech.com
    Attachments:
    array_example.vi ‏20 KB

  • Insert element into array problem

    Hi,
    I have problem about how to insert value into an array. here is one section, could anyone help me to insert input value into array and delete the first value in the array. Gap means to fill in code
    void Ins(String name)
    // Insert name or increment its multiplicity.
    // If the bag is full remove the oldest entry.
    int i; // Running index on BagName
    int target; // if target < n then name.equals(BagName[target]);
    // else target == n
    Date EntryDate; // Current date and time
    // Get current date and time
    EntryDate = new Date();
    BagDate[n] = EntryDate.toString();
    Mult[n] = n+1;
    BagName[n] = name;
    n++;
    // Search bag for name
    // Gap 2
    // Assertion: target < n => name.equals(BagName[target])
    // else target == n
    // Update Mult if target < n
    // Gap 3
    // Make room for and insert name if target not found
    } // Ins(String name)
    Message was edited by:
    sibojava
    Message was edited by:
    sibojava

    Do you have several accounts?
    See this thread, it's the same question:
    http://forum.java.sun.com/thread.jspa?threadID=5143232
    Kaj

  • Procedure or function for insert into select ...

    Hi!
    We need to know if we can create a procedure or function that will run the following script:
    insert into agent.train_schedule
    select 4000, '06:25' ,trunc(sysdate, 'year')+t.n
    from agent.trains, (select rownum -1 n from dual
    connect by level <= 365) t
    where agent.trains.id = 4000 and
    agent.trains.weekday like '%'||to_char(trunc(sysdate, 'year')+t.n, 'd',
    'nls_date_language=AMERICAN')||'%';
    The script inserts the train schedule dates into the train schedule table in accordance to the trains table.
    Any help would be appreciated.
    Thanks!

    Try the below:
    Create Or Replace procedure test_proc(p_train_no number, p_train_time varchar2) as
    begin
    insert into agent.train_schedule
    select p_train_no, p_train_time ,trunc(sysdate, 'year')+t.n
    from agent.trains, (select rownum -1 n from dual
    connect by level <= 365) t
    where agent.trains.id = p_train_no and
    agent.trains.weekday like '%'||to_char(trunc(sysdate, 'year')+t.n, 'd',
    'nls_date_language=AMERICAN')||'%';
    end;
    Call the procedure from the gui also pass the train number and the train time.
    Regards,
    Samujjwal Basu

  • How to insert an array of number into access database?

    How can I insert an array of numbers(double) into an access database and later read them back to an array I labview. I don't have the Database Connectivity toolset. I would prefer using the LABSQL or other free solution. Any idea on how to solve this. I have tried LABSQL and SQL commands, but when I do that I have to convert the number to a string and then make a SQL-command string. Is there a way where I don't have to convert the number into a string?

    Hello,
    I am not familiar with LABSQL and we do not do any support on that particular product. However I still want to give you some information on how to proceed. You can either store the array to binary format and by doing this you can save an entire array to one single element of the database. The other alternative is of course to save one-to-one in other words one element of the array in one element in the database.
    More info can be found here:
    http://digital.ni.com/public.nsf/websearch/3FE68BBDA95E845986256DB4006A22C0?OpenDocument
    Have you checked MSDN for information regarding this? You might be able to find useful SQL code there to use.
    Regards,
    Jimmie A.
    Applications Engineer, National Instruments
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • Inserting into Postgres via ODBC Gateway

    Hi, I've made some tests, here are results and questions:
    Postgres:
    CREATE TABLE t_dump
      str character varying(100)
    )Oracle: [ORADB: db link to Postgrers]
    INSERT INTO "t_dump"@ORADB VALUES ('test'); Works fine, both from SQL as from PL/SQL
    However:
    Declare
    m_str Varchar2 (10) := 'test';
    Begin
    INSERT INTO "t_dump"@ORADB VALUES (m_str); 
    End;Gives me an error:
    Error report:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-02067: transaction or savepoint rollback required
    ORA-28511: lost RPC connection to heterogeneous remote agent using SID=ORA-28511: lost RPC connection to heterogeneous remote agent using SID=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DB)(PORT=1521))(CONNECT_DATA=(SID=pg)))
    ORA-02055: distributed update operation failed; rollback required
    ORA-02063: preceding lines from ORADB
    ORA-06512: at line 8
    00604. 00000 -  "error occurred at recursive SQL level %s"
    *Cause:    An error occurred while processing a recursive SQL statement
               (a statement applying to internal dictionary tables).
    *Action:   If the situation described in the next error on the stack
               can be corrected, do so; otherwise contact Oracle Support.Dynamic SQL gives exact same error:
    Declare
    m_str Varchar2 (10) := 'test';
    Begin
    EXECUTE IMMEDIATE
    'INSERT INTO "t_dump"@ORADB VALUES (:v0)'
      Using m_str;
    End;Is there any way I could use variables into queries?
    One more issiue:
    I have created partitioned table in Postgres, and simple INSERT statement works fine [SQL from Oracle]; however- the same statement, enclosed with begin/end [PL/SQL] needs about 60 seconds to finish. Is it normal behaviour? Is there any config/pragma/.. I could use to speed it up?
    Regards
    Bart Dabr

    Hi,
    Your sample also doesn't work in PL/SQL block..
    Here is my detailed config:
    Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    PostgreSQL 8.4.8 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 64-bit
    and latest ODBC version from Postgres webpage (09.00.0310)
    I will install the latest Postgres DB and try it then
    Here is the trace, with removed some 'libname=/usr/lib64/libodbc.so, funcname=SQLGetDescRec' parts from init
    Oracle Corporation --- WEDNESDAY OCT 05 2011 10:00:47.743
    Heterogeneous Agent Release
    11.2.0.1.0
    Oracle Corporation --- WEDNESDAY OCT 05 2011 10:00:47.743
        Version 11.2.0.1.0
    Entered hgogprd
    HOSGIP for "HS_FDS_TRACE_LEVEL" returned "255"
    Entered hgosdip
    setting HS_OPEN_CURSORS to default of 50
    setting HS_FDS_RECOVERY_ACCOUNT to default of "RECOVER"
    setting HS_FDS_RECOVERY_PWD to default value
    setting HS_FDS_TRANSACTION_LOG to default of HS_TRANSACTION_LOG
    setting HS_IDLE_TIMEOUT to default of 0
    setting HS_FDS_TRANSACTION_ISOLATION to default of "READ_COMMITTED"
    setting HS_NLS_NCHAR to default of "AL32UTF8"
    setting HS_FDS_TIMESTAMP_MAPPING to default of "DATE"
    setting HS_FDS_DATE_MAPPING to default of "DATE"
    setting HS_RPC_FETCH_REBLOCKING to default of "ON"
    setting HS_FDS_FETCH_ROWS to default of "100"
    setting HS_FDS_RESULTSET_SUPPORT to default of "FALSE"
    setting HS_FDS_RSET_RETURN_ROWCOUNT to default of "FALSE"
    setting HS_FDS_PROC_IS_FUNC to default of "FALSE"
    setting HS_FDS_CHARACTER_SEMANTICS to default of "FALSE"
    setting HS_FDS_MAP_NCHAR to default of "TRUE"
    setting HS_NLS_DATE_FORMAT to default of "YYYY-MM-DD HH24:MI:SS"
    setting HS_FDS_REPORT_REAL_AS_DOUBLE to default of "FALSE"
    setting HS_LONG_PIECE_TRANSFER_SIZE to default of "65536"
    setting HS_SQL_HANDLE_STMT_REUSE to default of "FALSE"
    setting HS_FDS_QUERY_DRIVER to default of "TRUE"
    setting HS_FDS_SUPPORT_STATISTICS to default of "FALSE"
    Parameter HS_FDS_QUOTE_IDENTIFIER is not set
    setting HS_KEEP_REMOTE_COLUMN_SIZE to default of "OFF"
    setting HS_FDS_GRAPHIC_TO_MBCS to default of "FALSE"
    setting HS_FDS_MBCS_TO_GRAPHIC to default of "FALSE"
    HOSGIP returned value of "32" for HS_FDS_SQLLEN_INTERPRETATION
    setting HS_CALL_NAME_ISP to "gtw$:SQLTables;gtw$:SQLColumns;gtw$:SQLPrimaryKeys;gtw$:SQLForeignKeys;gtw$:SQLProcedures;gtw$:SQLStatistics;gtw$:SQLGetInfo"
    setting HS_FDS_DELAYED_OPEN to default of "TRUE"
    setting HS_FDS_WORKAROUNDS to default of "0"
    Exiting hgosdip, rc=0
    ORACLE_SID is "pg"
    Product-Info:
      Port Rls/Upd:1/0 PrdStat:0
      Agent:Oracle Database Gateway for ODBC
      Facility:hsa
      Class:ODBC, ClassVsn:11.2.0.1.0_0008, Instance:pg
    Exiting hgogprd, rc=0
    hostmstr:          0:      HOA After hoagprd
    hostmstr:          0:      HOA Before hoainit
    Entered hgoinit
    HOCXU_COMP_CSET=1
    HOCXU_DRV_CSET=870
    HOCXU_DRV_NCHAR=873
    HOCXU_DB_CSET=873
    HOCXU_SEM_VER=112000
    Entered hgolofn at 2011/10/05-10:00:47
    HOSGIP for "HS_FDS_SHAREABLE_NAME" returned "/usr/lib64/libodbc.so"
    Entered hgolofns at 2011/10/05-10:00:47
    libname=/usr/lib64/libodbc.so, funcname=SQLAllocHandle
    symbol_peflctx=0xe74082a0
    hoaerr:0
    Exiting hgolofns at 2011/10/05-10:00:47
    Entered hgolofns at 2011/10/05-10:00:47
    Exiting hgolofns at 2011/10/05-10:00:47
    Exiting hgolofn, rc=0 at 2011/10/05-10:00:47
    HOSGIP for "HS_OPEN_CURSORS" returned "50"
    HOSGIP for "HS_FDS_FETCH_ROWS" returned "100"
    HOSGIP for "HS_LONG_PIECE_TRANSFER_SIZE" returned "65536"
    HOSGIP for "HS_NLS_NUMERIC_CHARACTER" returned ".,"
    HOSGIP for "HS_KEEP_REMOTE_COLUMN_SIZE" returned "OFF"
    HOSGIP for "HS_FDS_DELAYED_OPEN" returned "TRUE"
    HOSGIP for "HS_FDS_WORKAROUNDS" returned "0"
    HOSGIP for "HS_FDS_MBCS_TO_GRAPHIC" returned "FALSE"
    HOSGIP for "HS_FDS_GRAPHIC_TO_MBCS" returned "FALSE"
    treat_SQLLEN_as_compiled = 0
    Exiting hgoinit, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoainit
    hostmstr:          0:      HOA Before hoalgon
    Entered hgolgon at 2011/10/05-10:00:47
    reco:0, name:kg, tflag:0
    Entered hgosuec at 2011/10/05-10:00:47
    Exiting hgosuec, rc=0 at 2011/10/05-10:00:47
    HOSGIP for "HS_FDS_RECOVERY_ACCOUNT" returned "RECOVER"
    HOSGIP for "HS_FDS_TRANSACTION_LOG" returned "HS_TRANSACTION_LOG"
    HOSGIP for "HS_FDS_TIMESTAMP_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_DATE_MAPPING" returned "DATE"
    HOSGIP for "HS_FDS_CHARACTER_SEMANTICS" returned "FALSE"
    HOSGIP for "HS_FDS_MAP_NCHAR" returned "TRUE"
    HOSGIP for "HS_FDS_RESULTSET_SUPPORT" returned "FALSE"
    HOSGIP for "HS_FDS_RSET_RETURN_ROWCOUNT" returned "FALSE"
    HOSGIP for "HS_FDS_PROC_IS_FUNC" returned "FALSE"
    HOSGIP for "HS_FDS_REPORT_REAL_AS_DOUBLE" returned "FALSE"
    using kg as default value for "HS_FDS_DEFAULT_OWNER"
    HOSGIP for "HS_SQL_HANDLE_STMT_REUSE" returned "FALSE"
    Entered hgocont at 2011/10/05-10:00:47
    HS_FDS_CONNECT_INFO = "pg"
    RC=-1 from HOSGIP for "HS_FDS_CONNECT_STRING"
    Entered hgogenconstr at 2011/10/05-10:00:47
    dsn:pg, name:kg
    optn:
    Entered hgocip at 2011/10/05-10:00:47
    dsn:pg
    Exiting hgocip, rc=0 at 2011/10/05-10:00:47
    ##>Connect Parameters (len=22)<##
    ## DSN=pg;
    #! UID=kg;
    #! PWD=*
    Exiting hgogenconstr, rc=0 at 2011/10/05-10:00:47
    Entered hgolosf at 2011/10/05-10:00:47
    ODBC Function-Available-Array 0xFFFE 0x01FF 0xFF00 0xFA7F 0x03FF 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0x0000 0x0000 0x0000 0x0000
                                  0x0000 0x0000 0xFE00 0x3B5D
    Exiting hgolosf, rc=0 at 2011/10/05-10:00:47
    DriverName:psqlodbcw.so, DriverVer:09.00.0310
    DBMS Name:PostgreSQL, DBMS Version:8.4.8
    Exiting hgocont, rc=0 at 2011/10/05-10:00:47
    SQLGetInfo returns Y for SQL_CATALOG_NAME
    SQLGetInfo returns 0 for SQL_MAX_CATALOG_NAME_LEN
    Exiting hgolgon, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoalgon
    RPC Calling nscontrol(0), rc=0
    hostmstr:          0: RPC Before Upload Caps
    hostmstr:          0:      HOA Before hoaulcp
    Entered hgoulcp at 2011/10/05-10:00:47
    Entered hgowlst at 2011/10/05-10:00:47
    Exiting hgowlst, rc=0 at 2011/10/05-10:00:47
    SQLGetInfo returns 0x1d for SQL_OWNER_USAGE
    TXN Capable:2, Isolation Option:0xa
    SQLGetInfo returns 64 for SQL_MAX_SCHEMA_NAME_LEN
    SQLGetInfo returns 64 for SQL_MAX_TABLE_NAME_LEN
    SQLGetInfo returns 0 for SQL_MAX_PROCEDURE_NAME_LEN
    SQLGetInfo returns " (0x22) for SQL_IDENTIFIER_QUOTE_CHAR
    SQLGetInfo returns Y for SQL_COLUMN_ALIAS
    3 instance capabilities will be uploaded
      capno:1989, context:0x00000000, add-info:        0
      capno:1991, context:0x0001ffff, add-info:        0
      capno:1992, context:0x0001ffff, add-info:        0
    Exiting hgoulcp, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoaulcp
    hostmstr:          0: RPC After Upload Caps
    hostmstr:          0: RPC Before Upload DDTR
    hostmstr:          0:      HOA Before hoauldt
    Entered hgouldt at 2011/10/05-10:00:47
    NO instance DD translations were uploaded
    Exiting hgouldt, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoauldt
    hostmstr:          0: RPC After Upload DDTR
    hostmstr:          0: RPC Before Begin Trans
    hostmstr:          0:      HOA Before hoabegn
    Entered hgobegn at 2011/10/05-10:00:47
    tflag:0 , initial:1
    hoi:0x1c6766b8, ttid (len 22) is ...
      00: 53452E65 36323536 3636622E 322E3135  [SE.e625666b.2.15]
      10: 2E393235 3737                        [.92577]
                     tbid (len 19) is ...
      00: 53455B32 2E31352E 39323537 375D5B31  [SE[2.15.92577][1]
      10: 2E345D                               [.4]]
    Exiting hgobegn, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoabegn
    hostmstr:          0: RPC After Begin Trans
    hostmstr:          0: RPC Before Describe Procedure
    hostmstr:          0:      HOA Before hoapdsc
    Entered hgopdsc at 2011/10/05-10:00:47
    Describing procedure kg.test
    Output hoada
    hgopdsc, line 1406: NO hoada to print
    Exiting hgopdsc, rc=942 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoapdsc
    hostmstr:          0: RPC After Describe Procedure
    hostmstr:          0: RPC Before Describe Table
    hostmstr:          0:      HOA Before hoadtab
    Entered hgodtab at 2011/10/05-10:00:47
    count:1
      table: kg.test
    Allocate hoada[0] @ 0xdcaa10
    Entered hgopcda at 2011/10/05-10:00:47
    Column:1(col1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:-1, sign:1, radix:10
    Exiting hgopcda, rc=0 at 2011/10/05-10:00:47
    Entered hgopcda at 2011/10/05-10:00:47
    Column:2(col2): dtype:12 (VARCHAR), prc/scl:100/0, nullbl:1, octet:255, sign:1, radix:10
    Exiting hgopcda, rc=0 at 2011/10/05-10:00:47
    The hoada for table kg.test follows...
    hgodtab, line 876: Printing hoada @ 0xdcaa10
    MAX:2, ACTUAL:2, BRC:1, WHT=6 (TABLE_DESCRIBE)
    hoadaMOD bit-values found (0x200:TREAT_AS_CHAR)
    DTY         NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
      4 INTEGER Y          4          4   0/  0    0   0   0 col1
    12 VARCHAR Y        255        255   0/  0    0   0  200 col2
    Exiting hgodtab, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoadtab
    hostmstr:          0:      HOA Before hoadafr
    Entered hgodafr, cursor id 0 at 2011/10/05-10:00:47
    Free hoada @ 0xdcaa10
    Exiting hgodafr, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoadafr
    hostmstr:          0: RPC After Describe Table
    hostmstr:          0: RPC Before SQL Bundling
    hostmstr:          0:      HOA Before hoxpars
    Entered hgopars, cursor id 1 at 2011/10/05-10:00:47
    type:0
    SQL text from hgopars, id=1, len=46 ...
         00: 53454C45 43542041 312E2263 6F6C3122  [SELECT A1."col1"]
         10: 2C41312E 22636F6C 32222046 524F4D20  [,A1."col2" FROM ]
         20: 226B6722 2E227465 73742220 4131      ["kg"."test" A1]
    Exiting hgopars, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoxpars
    hostmstr:          0:      HOA Before hoxopen
    Entered hgoopen, cursor id 1 at 2011/10/05-10:00:47
    hgoopen, line 86: NO hoada to print
    Deferred open until first fetch.
    Exiting hgoopen, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoxopen
    hostmstr:          0:      HOA Before hoxdscr
    Entered hgodscr, cursor id 1 at 2011/10/05-10:00:47
    Allocate hoada @ 0xdca9d0
    Entered hgopcda at 2011/10/05-10:00:47
    Column:1(col1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:0, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2011/10/05-10:00:47
    Entered hgopcda at 2011/10/05-10:00:47
    Column:2(col2): dtype:12 (VARCHAR), prc/scl:100/0, nullbl:1, octet:255, sign:1, radix:0
    Exiting hgopcda, rc=0 at 2011/10/05-10:00:47
    hgodscr, line 880: Printing hoada @ 0xdca9d0
    MAX:2, ACTUAL:2, BRC:100, WHT=5 (SELECT_LIST)
    hoadaMOD bit-values found (0x200:TREAT_AS_CHAR)
    DTY         NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
      4 INTEGER Y          4          4   0/  0    0   0   0 col1
    12 VARCHAR Y        255        255   0/  0    0   0  200 col2
    Exiting hgodscr, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoxdscr
    hostmstr:          0: RPC After SQL Bundling
    hostmstr:          0: RPC Before Describe Table
    hostmstr:          0:      HOA Before hoadtab
    Entered hgodtab at 2011/10/05-10:00:47
    count:1
      table: test
    Allocate hoada[0] @ 0xdcdd88
    Entered hgopcda at 2011/10/05-10:00:47
    Column:1(col1): dtype:4 (INTEGER), prc/scl:10/0, nullbl:1, octet:-1, sign:1, radix:10
    Exiting hgopcda, rc=0 at 2011/10/05-10:00:47
    Entered hgopcda at 2011/10/05-10:00:47
    Column:2(col2): dtype:12 (VARCHAR), prc/scl:100/0, nullbl:1, octet:255, sign:1, radix:10
    Exiting hgopcda, rc=0 at 2011/10/05-10:00:47
    The hoada for table test follows...
    hgodtab, line 876: Printing hoada @ 0xdcdd88
    MAX:2, ACTUAL:2, BRC:1, WHT=6 (TABLE_DESCRIBE)
    hoadaMOD bit-values found (0x200:TREAT_AS_CHAR)
    DTY         NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
      4 INTEGER Y          4          4   0/  0    0   0   0 col1
    12 VARCHAR Y        255        255   0/  0    0   0  200 col2
    Exiting hgodtab, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoadtab
    hostmstr:          0:      HOA Before hoadafr
    Entered hgodafr, cursor id 0 at 2011/10/05-10:00:47
    Free hoada @ 0xdcdd88
    Exiting hgodafr, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoadafr
    hostmstr:          0: RPC After Describe Table
    hostmstr:          0: RPC Before SQL Bundling
    hostmstr:          0:      HOA Before hoxclse
    Entered hgoclse, cursor id 1 at 2011/10/05-10:00:47
    Exiting hgoclse, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoxclse
    hostmstr:          0:      HOA Before hoadafr
    Entered hgodafr, cursor id 1 at 2011/10/05-10:00:47
    Free hoada @ 0xdca9d0
    Exiting hgodafr, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoadafr
    hostmstr:          0:      HOA Before hoxpars
    Entered hgopars, cursor id 1 at 2011/10/05-10:00:47
    type:0
    SQL text from hgopars, id=1, len=48 ...
         00: 494E5345 52542020 494E544F 20227465  [INSERT  INTO "te]
         10: 73742220 2822636F 6C31222C 22636F6C  [st" ("col1","col]
         20: 32222920 56414C55 45532028 3F2C3F29  [2") VALUES (?,?)]
    Exiting hgopars, rc=0 at 2011/10/05-10:00:47
    hostmstr:          0:      HOA After hoxpars
    hostmstr:          0:      HOA Before hoaexec
    Entered hgoexec, cursor id 1 at 2011/10/05-10:00:47
    octype=4 (INSERT)
    hgoexec, line 108: Printing hoada @ 0xdcaa50
    MAX:2, ACTUAL:2, BRC:1, WHT=3 (BIND_LIST)
    hoadaMOD bit-values found (0x200:TREAT_AS_CHAR)
    DTY         NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
      3 DECIMAL N          1          0   0/  0    0   0   0 ?
    12 VARCHAR N          4          0   0/  0  870   0  200 ?
    Entered hgoprbv at 2011/10/05-10:00:47
    hgoprbv, line 145: Printing hoada @ 0xdcaa50
    MAX:2, ACTUAL:2, BRC:1, WHT=3 (BIND_LIST)
    hoadaMOD bit-values found (0x200:TREAT_AS_CHAR)
    DTY         NULL-OK  LEN  MAXBUFLEN   PR/SC  CST IND MOD NAME
      3 DECIMAL N          1          0   0/  0    0   0   0 ?
    12 VARCHAR N          4          0   0/  0  870   0  200 ?
    Exiting hgoprbv, rc=0 at 2011/10/05-10:00:47
    {code}
    End of the trace, session closed, nothing more in file
    Regards
    Bart Dabr                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              

  • Problem inserting record using INSERT INTO

    I am an amateur web builder using some ColdFusion functionality to access information on an Access database. I know very little about ColdFusion syntax, but I'm using Dreamweaver CS3 to help generate most of the code. I'm working on an insert record page to create a user database with login information. I'm not sure what the problem is, but I'm getting a syntax error referencing this particular portion of the code:
    Syntax error in INSERT INTO statement.
    The error occurred in C:\ColdFusion9\wwwroot\Everett\register.cfm: line 22
    Below is the entire page with line 22 (referenced in the error message) in red. Any ideas?
    <cfset CurrentPage=GetFileFromPath(GetBaseTemplatePath())>
    <cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "register">
      <cfquery datasource="everettweb">  
        INSERT INTO Users ([First Name], [Last 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//EN" "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 href="main.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- InstanceBeginEditable name="doctitle" -->
    <title>Everett Music Department, Everett, MA</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=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.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,a=document.MM_sr; for(i=0;a&&i<a.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])&&d.all) 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 href="main.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">
      <tr>
        <td colspan="3"><img src="top_border.jpg" width="960" height="20" align="top" /></td>
      </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></td>
      </tr>
      <tr>
        <td height="35" width="301"><a href="index.php"><img src="e_oval_bottom.jpg" height="35" width="234" border="0" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('home','','menu_home_over.jpg',1)"><img src="menu_home.jpg" width="67" height="35" name="home" border="0" id="home" /></a></td>
        <td width="251"><ul id="MenuBar1" class="MenuBarHorizontal">
          <li><a class="MenuBarItemSubmenu" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('about','','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="#">History</a></li>
              <li><a href="#">Media</a></li>
            </ul>
          </li>
          <li><a class="MenuBarHorizontal" href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('ensembles','','menu_ensembles_over.jpg',1)"><img src="menu_ensembles.jpg" width="98" height="35" name="ensembles" border="0" id="ensembles" /></a>
            <ul>
              <li><a href="#">Band</a></li>
              <li><a href="#">Chorus</a></li>
              <li><a href="#">Strings</a></li>
            </ul>
          </li>
          <li><a class="MenuBarItemSubmenu" href="#" onmouseout="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" /></a>
            <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="#">Lafayette School</a></li>
              <li><a href="#">Parlin School</a></li>
              <li><a href="#">Webster School</a></li>
              <li><a href="#">Whittier School</a></li>
            </ul>
          </li>
        </ul>
        </td>
               <td width="408"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('events','','menu_events_over.jpg',1)"><img src="menu_events.jpg" width="74" height="35" name="events" border="0" id="events" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('faculty','','menu_faculty_over.jpg',1)"><img src="menu_faculty.jpg" width="79" height="35" name="faculty" border="0" id="faculty" /></a><a href="#" onmouseout="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="#" onmouseout="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="#" onmouseout="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" /></td>
      </tr>
      <tr height="10">
        <td colspan="3"><img src="menu_bottom_spacer.jpg" height="10" width="960" /></td>
      </tr>
    </table>
    <table width="960" cellpadding="0" cellspacing="0" align="center">
      <tr height="50">
        <td width="30" background="left_border.jpg"><img src="clear.gif" width="30" height="50" /></td>
        <td width="900" bgcolor="#FFFFFF">
          <table width="900" cellpadding="0" cellspacing="0">
            <tr>
              <td width="900" height="350" valign="top"><!-- InstanceBeginEditable name="PageBody" -->
          <form action="<cfoutput>#CurrentPage#</cfoutput>" method="POST" name="register" preloader="no" id="register">
                <table width="100%">
                  <tr>
                    <td colspan="2" class="heading1">Fill in the information below to register for this site:</td>
                  </tr>
                  <tr>
                    <td colspan="2"><img src="clear.gif" height="15" /></td>
                  </tr>
                  <tr>
                    <td width="50%" class="form" align="right">First Name:</td>
                    <td width="50%"><span id="sprytextfield1">
                      <input type="text" name="first_name" required="yes" id="first_name" width="150" typeahead="no" showautosuggestloadingicon="true" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Last Name:</td>
                    <td><span id="sprytextfield2">
                      <input type="text" name="last_name" required="yes" id="last_name" width="150" typeahead="no" showautosuggestloadingicon="true" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Email Address:</td>
                    <td><span id="sprytextfield3">
                    <input type="text" name="email" validate="email" required="yes" id="email" width="150" typeahead="no" showautosuggestloadingicon="true" />
                    <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Confirm Email Address:</td>
                    <td><span id="sprytextfield4"><span id="ConfirmWidget">
                    <input type="text" name="email_confirm" validate="email" required="yes" id="email_confirm" width="150" typeahead="no" showautosuggestloadingicon="true" />
                    <span class="confirmInvalidMsg">The values do not match</span></span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Password:</td>
                    <td><span id="sprytextfield5">
                      <input type="password" name="password" required="yes" id="password" width="150" />
                      <span class="textfieldRequiredMsg">A value is required.</span></span></td>
                  </tr>
                  <tr>
                    <td class="form" align="right">Confirm Password:</td>
                    <td><span id="sprytextfield6"><span id="ConfirmWidget">
                      <input type="password" name="password_confirm" required="yes" id="password_confirm" width="150" />
                      <span class="confirmInvalidMsg">The values do not match</span></span></span></td>
                  </tr>
                  <tr>
                    <td> </td>
                    <td><input name="submit" type="submit" id="submit" value="Register" /></td>
                  </tr>
                </table>
          <input type="hidden" name="MM_InsertRecord" value="register" />
          </form>
          <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 --></td>
            </tr>
          </table>
        </td>
        <td width="30" background="right_border.jpg"><img src="clear.gif" width="30" height="50" /></td>
      </tr>
      <tr>
        <td colspan="3" background="footer.jpg" class="footer" height="80"/>This website best viewed using:<br /><a href="http://www.firefox.com"><img src="firefox_logo.gif" width="110" height="40" border="0" /></a></td>
      </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)
    That oh-so-uninformative error is because "Password" is a reserved word with your database driver.  Either escape it by putting square brackets around it too, or rename the column permanently. It is best to avoid using reserved words whenever possible. So renaming the column is the better option.  Also, I would try and avoid using invalid characters like spaces in column names ie "First Name". It is technically allowed, but it requires special handling everywhere which adds unecessary complexity.
    I'm not sure what the problem is, but I'm getting a syntax error referencing this particular portion of the code:
    Do not take the error line numbers as gospel. Sometimes they just indicate that the error is within the vincinty of that line.
    I'm using Dreamweaver CS3 to help generate most of the code
    Unforutnately, DW wizards generate some truly awful and verbose code.  To give you an idea, here is what the query should look like, without all the wizard nonsense.
      <cfparam name="FORM.first_name" default="">
      <cfparam name="FORM.last_name" default="">
      <cfparam name="FORM.email" default="">
      <cfparam name="FORM.FORM.password" default="">
      <cfquery datasource="YourDSNName"> 
        INSERT INTO Users ([First Name], [Last Name], [Email Address], [Password])
        VALUES (
          <cfqueryparam value="#FORM.first_name#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.last_name#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.email#" cfsqltype="cf_sql_varchar">
         , <cfqueryparam value="#FORM.password#" cfsqltype="cf_sql_varchar">
      </cfquery>
    CF is pretty easy to learn. You might want to begin perusing the CF documentation and a few tutorials to get more familiar with the language. Since you are working with a database, I would also recommend a  SQL tutorial.

  • Sorting numbers based on value into arrays

    Hi ...
    I currently have a large list of numbers inside an array.. say from 0 to 400 000. They appear in order, but are unevenly spaced.
    Now I'd like to sort these numbers into arrays.
    I want to say: Put all numbers from 0 to 10 into newArray[0]. Put all numbers from 10 to 35 into newArray[1] ....
    In the end I need a two - dimensional array with numbers. Is this possible in LabView ? Can it be done in acceptable speed ?
    Thank you for your help   

    While I haven't figured out a way to do this efficiently, the attached
    shows a method of doing it number by number.  Perhaps the most
    efficient may be to insert Matlab code and use a sort function, or
    equivalent in c.
    To use this to sort multiple numbers, put inside a for loop and build up an array. (also see attached).
    Message Edited by Robert.Bedford on 09-19-2005 08:53 AM
    Attachments:
    single_number_sort.vi ‏18 KB
    array_sort.vi ‏21 KB

  • Parse into array using JDOM! please help

    hey,
    i've managed to parse an xml document using JDOM
    i[b] need to be able to parse it and store the text (the value of each node) into an array, and then insert into db etc.
    the problem is with the recursive function listChildren which calls itself... can someone tell me where do i insert the block of code such that i can store it into an array of string.
    here's the code:
    public static void parse(String stock) throws SQLException
    SAXBuilder builder = new SAXBuilder();
    Reader r = new StringReader(stock);
    Document doc = builder.build(r);
    Element root = doc.getRootElement();
    listChildren(root, 0);
    public static void listChildren(Element current, int depth) throws Exception
    String nodes = current.getName();
    System.out.println(nodes + " : " + current.getText());
    List children = current.getChildren();
    Iterator iterator = children.iterator();
    while(iterator.hasNext())
    Element child = (Element) iterator.next();
    listChildren(child, depth+1);
    i'm looking for something like:
    a=current.getText();
    but i donno where to include this line of code, please help
    cheers,
    Shivek Sachdev

    hi, I suggest you make an array of byte arrays
    --> Byte[][] and use one row for each number
    you can do 2 things,
    take each cipher of one number and put one by one in each column of the row correspondent to that number. of course it may take too much room if the int[] is too big, but that is the easiest way I think
    the other way is dividing your number into bitsets(class BitSet) with sizes of 8 bits and then you can save each bit into each column of your array. and you still have one number in each row. To put your numbers back use the same class.
    Maybe someone has an easier way, I couldnt think of any.

  • Combining XML into Array

    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionI'm having trouble combining two pieces of sql using xml. I'm building an array of "items" using a select statement that works just fine. (contained_by is the parent of all the children in the array with the same contained by value)
    SELECT XMLELEMENT("itemArray", XMLAGG(extract(xml_data,'/item')))    
    FROM description_test
    WHERE contained_by = 181315;
    <itemArray>
       <item>...</item>
       <item>...</item>
       <item>...</item>
    </itemArray>Now, when I try to "attach" the parent, I can't seem to get it to work.
    SELECT p.naId, XMLCONCAT(extract(p.xml_data,'/fileUnit'),
               XMLAGG(XMLELEMENT("itemArray", extract(c.xml_data,'/item'))))
    FROM description_test p --parent,
    description_test c --child
    WHERE c.contained_by = p.naid;
    ORA-00937: not a single-group group function
    00937. 00000 -  "not a single-group group function"
    SELECT p.naId, XMLCONCAT(extract(p.xml_data,'/fileUnit'),
           XMLAGG(XMLELEMENT("itemArray", extract(c.xml_data,'/item'))))
    FROM description_test p, --parent,
    description_test c --child
    WHERE p.desc_type = 'FU'
    AND c.contained_by = p.naid
    and rownum < 5
    group by p.naid;
    ORA-00979: not a GROUP BY expression
    00979. 00000 -  "not a GROUP BY expression"what I'm expecting is the following to come back :
    <fileUnit>
       <some_data/>
       <more_data/>
       <itemArray>
          <item>...</item>
          <item>...</item>
          <item>...</item>
       </itemArray>
    </fileUnit>Not sure why this is not working. If I do the same thing without trying to build the xml array I get the following:
    SELECT p.naId, count(c.naid) AS CHILD_COUNT
    FROM description_test p,
    description_test c
    WHERE c.contained_by=p.naid
    group by p.naid;
    NAID  CHILD_COUNT
    135801     25
    174634     1
    137211     15
    136529     30
    143455     36
    145696     42Help is greatly appreciated. Thanks!!!

    Hi,
    As always, some sample data would help to understand the problem.
    From what you've posted so far, I assume something like this :
    create table description_test (
      naid number
    , contained_by number
    , xml_data xmltype
    insert into description_test values (1, null, xmltype('<fileUnit><some_data/><more_data/></fileUnit>'));
    insert into description_test values (2, null, xmltype('<fileUnit><some_data/><more_data/></fileUnit>'));
    insert into description_test values (3, 1, xmltype('<item>item 1.1</item>'));
    insert into description_test values (4, 1, xmltype('<item>item 1.2</item>'));
    insert into description_test values (5, 1, xmltype('<item>item 1.3</item>'));
    insert into description_test values (6, 2, xmltype('<item>item 2.1</item>'));
    insert into description_test values (7, 2, xmltype('<item>item 2.2</item>'));What you're trying to do implies grouping on an XMLType column, which is not possible since the XMLType object doesn't have any MAP or ORDER method.
    The solution is to use a subquery, like below.
    It also seems that you want insert, not concat :
    SQL> select p.naid
      2       , insertchildxml(
      3           p.xml_data
      4         , '/fileUnit'
      5         , 'itemArray'
      6         , (
      7             select xmlelement("itemArray", xmlagg(c.xml_data))
      8             from description_test c
      9             where c.contained_by = p.naid
    10           )
    11         ) as fileunit
    12  from description_test p
    13  where p.contained_by is null
    14  ;
    NAID FILEUNIT
       1 <fileUnit>
           <some_data/>
           <more_data/>
           <itemArray>
             <item>item 1.1</item>
             <item>item 1.2</item>
             <item>item 1.3</item>
           </itemArray>
         </fileUnit>
       2 <fileUnit>
           <some_data/>
           <more_data/>
           <itemArray>
             <item>item 2.1</item>
             <item>item 2.2</item>
           </itemArray>
         </fileUnit>

Maybe you are looking for

  • How to cancel OVI FILES? URGENT!!

    thank you for reading... i acidently signed up for OVI files and instead of OVI (the thing you use to download apps) anyways... now i feel like ppl can access my computer using a mobile phone if they know my username and password... if i remove the O

  • Installing new aluminum keyboard

    I'm due to receive a new aluminum keyboard this afternoon and I've got a Mac Pro running 10.4.10. Questions: 1.Should I apply the new 1.2 keyboard update prior to swapping my old keyboard for the new or install the update and then swap the keyboards.

  • Homogeneous Database Copy

    Hi, I am currently doing the process above using a tool supplied by SAP. For example: Source SID = DEV Source DB  = MSSQL 2000 Source OS  = Windows 2000 Advan Server R/3        = 4.7, 640 Target System is as above but lets put the SID as QAS. By usin

  • Where to buy new, sealed apple 23 (white/clear) model?

    please can someone tell me where i could possibly purchase a brand new sealed apple 23 white/ clear model? thanks

  • IPhoto/Aperture 3 preference by device.

    Is there a way to have iPhoto only open for my iPhone 4? I prefer to use iPhoto with my iPhone and Aperture 3 solely for my cameras. In other words, when I connect my iPhone to my Mac, I only want iPhoto to open even though I prefer Aperture for my c