MySQL syntax error with TestStand 4.0 database logging

I had been using MS Access database to log results which worked fine but the access database is too limited. Switched to MySql. Database works fine and I can query it from Visual C++ and was able to create all my result tables fine from TestStand.
I get a syntax error when actually trying to log results and it has to do with either a missing quote or and extra quote, I can't quite tell. I thought I saw a post on this somewhere but can't find it now. Here is the complaint from TestStand:
An error occurred calling 'LogOneResult' in 'ITSDBLog' of 'zNI TestStand Database Logging'
An error occurred executing a statement.
Statement: UUT_RESULT.
[MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT VALUES' at line 1
Description: [MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT VALUES' at line 1
Number: -2147467259
NativeError: 1064
SQLState: 37000
Reported by: Microsoft OLE DB Provider for ODBC Drivers
Description: Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
Number: -2147217887
NativeError: 0
SQLState: 37000
Reported by: Microsoft OLE DB Provider for ODBC Drivers
Source: TSDBLog
And here is all that appears in the MySql logfile:
INSERT INTO UUT_RESULT DEFAULT VALUES
070914
You can't see it here but the string is truncated after the word VALUES. The next line starts with the odd number.
Any ideas?
Thanks,
Bill Peters
BAE SYSTEMS

Sure. There were two bugs in the ini file that contains the default TS schemas (I think it was Default_Database_Options.ini or like that...).
Anyway the table description for STEP_NUMERICLIMIT had for it's command line INSERT INTO MEAS_NUMERICLIMIT. I guess TestStand looked at that and said hmm I better create that table too. Then later down the page when you try to create MEAS_NUMERICLIMIT it says the table already exists even though it is empty. The generate SQL button builds a bad file and then the database viewer creates a bad database. I would have to go into MySql and drop the database. I had to save the schema under a custom name, edit it read it back in, generate a new SQL file, but then it would still fail validation because the ini files don't get updated until you exit TestStand. So basically I did this process 3 times before I got it right.
It's wasn't a big deal but it's amazing how a little thing can cause a lot of work.
The second bug, I'm not certain was initially in the file or somehow got set on the fly. There was a random int statement at the very end of the SQL table description for UUT_RESULT. It was also in the schema INI file. Since the int had no name and occurred in a odd place, it created a syntax error in MySql. Same fix as above.
But like I said it's working great now. I like this approach because I serve it to the net with Apache and parse the database with simple PHP scripts.
Thanks,
Bill Peters
BAE SYSTEMS

Similar Messages

  • JDBC/MySQL syntax error on MySQL server login

    I am making a simple JSP page and I'm trying to test basic functionality/connectivity with a MySQL database. Included is my index.jsp code and the errors given by Tomcat. Any insights would be very helpful, thanks.
    org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 13 <%@ page import="java.sql.*"%> <% Connection con = null; Statement stmt = null; ResultSet rs = null; %> <html> <body> <% Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/database", "correctUserName", "correctPassword");    //<-line 13 stmt = con.createStatement(); rs = stmt.executeQuery("SELECT * FROM table"); while(rs.next()){ out.println(rs.getString("name")+"<br>"); } rs.close(); %> </body </html> Stacktrace: org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) root cause javax.servlet.ServletException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '????????????????' at line 1 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791) org.apache.jsp.index_jsp._jspService(index_jsp.java:86) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

    chrislard wrote:
    That is a good idea for actual implementation, but this is just a test. There isn't any reason that this should not work because it hasn't been broken up into multiple files etc.Evidence would indicate that it is not in fact working though. And the error indicates a syntax error. Because it is JSP there is no assured way to localize the problem, not to mention that since it is running is a container there is no assurance that the posted code is even what is running.
    My suggestion on the other hand completely eliminates all of those possibilities.
    But if it helps you the posted SQL does not have any syntax errors. So if you can solve the problem that you have knowing just that then go for it. Myself I would at least create a test jig.

  • How to find syntax errors in TestStand?

    Hi,
    I have about 70 sequences and I'm trying to find any syntax errors, which evaded my "error radar". How can I find these in TestStand without moving through every step (which would around 1000 and more steps!)? I'm missing something like the "syntax" check in LabVIEW, which indicates right in your face, if you brake the block diagram.
    Thanks for any help.
    Marc
    CLD
    Solved!
    Go to Solution.

    Checking expressions at edit time to make sure that they will evaluate correctly at run time is a tricky process.  For instance, what if you are dynamically creating an array at run time, and then iterating through that array.  Unless you give that array good default values (which may be difficult if it is an array of custom types), your expressions will not be correct at edit time, and could be flagged as errors.
    However, this is a request that we have heard quite a bit, and NI is investigating ways to allow customers to validate their expressions before running a sequence.
    In the meantime, one of the TestStand developers created a tool that does what Doug was describing: iterates through every property object in a file and if it is an expression, tries to evaluate it.  This tool is written as a sequence file in TestStand 4.1.  Please note that since it uses recursion to iterate through each property object, and since recursion with sequences can be rather slow, the performance of this tool may be improved by duplicating its functionality with a code module (rather than sequence steps).
    Message Edited by Josh W. on 03-30-2009 02:20 PM
    Josh W.
    Certified TestStand Architect
    Formerly blue
    Attachments:
    CheckExpressions41.seq ‏13 KB

  • Syntax Error with EXPORT statement in ECC 6

    Hi All,
    I have one issue with EXPORT statement syntax.
    I have declared data like below:
    DATA: BEGIN OF mem_id,
              mandt LIKE sy-mandt,
              uname LIKE sy-uname,
              modno LIKE sy-modno,
            END OF mem_id.
    export the memory id
        EXPORT E_VBKOK XANZPK TEXTTAB XBOLNR TO MEMORY ID MEM_ID.
    When I am checking the syntax error i am getting like "MEM_ID" must be a character-type field (data type C, N, D or T). by "INTERFACE". by "INTERFACE". "INTERFACE". by "INTERFACE". by "INTERFACE".
    I know this statement would be like IMPORT ITAB TO JTAB FROM MEMORY ID 'table'. So I have written like below
    EXPORT E_VBKOK XANZPK TEXTTAB XBOLNR TO MEMORY ID 'MEM_ID'. But still it is throwing an error.
    Can you please let me know how can I resolve this?
    Regards,
    Jyothi CH.

    Hi Jyothi,
    data: l_var type string.
    concatenate '6' '8' into l_var separated by space.
    export l_var to memory id 'BB'.
    Here we have to declare the type(structure) for l_var not for BB
    and in another program
    data:l_var type string.
    import l_var from memory id 'BB'.
    write : l_var.

  • Syntax Error with JSON.Parse method to parse SharePoint List Items

    Hi All,
    I want to get SharePoint List data and bind that retrived data to the JQuery Grid Control.
    For this I used SPServices to get the SharePoint List data in SOAP Envelope. Now I need to parse the soap envelope and store the retrieved items in array to pass it to the Grid Control.
    While using the JSON.Parse(resporseText) method, Iam consistenly getting an Syntax Error!
    Could anyone help me with this ?
    Please find the SOAP Envelope I received from SP List as below:
    "<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><GetListItemsResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/"><GetListItemsResult><listitems xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
    xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
    xmlns:rs='urn:schemas-microsoft-com:rowset'
    xmlns:z='#RowsetSchema'>
    <rs:data ItemCount="2">
    <z:row ows_OBNumber='112211.000000000' ows_Project_x0020_Name='Project 1' ows_MetaInfo='11;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 1' ows_ID='11' ows_UniqueId='11;#{FBBCBCF9-666D-42F9-92D7-67188C51BC9B}' ows_owshiddenversion='1' ows_FSObjType='11;#0' ows_Created='2015-01-12 10:25:06' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:25:06' ows_FileRef='11;#sites/Lists/Projects/11_.000' />
    <z:row ows_OBNumber='1122343.00000000' ows_Project_x0020_Name='Project 2 ' ows_MetaInfo='12;#' ows__ModerationStatus='0' ows__Level='1' ows_Title='Project 2' ows_ID='12' ows_UniqueId='12;#{0D772B76-68E4-4769-B6FF-6A269F9C7ABD}' ows_owshiddenversion='1' ows_FSObjType='12;#0' ows_Created='2015-01-12 10:33:48' ows_PermMask='0x7fffffffffffffff' ows_Modified='2015-01-12 10:33:48' ows_FileRef='12;#sites/Lists/Projects/12_.000' />
    </rs:data>
    </listitems></GetListItemsResult></GetListItemsResponse></soap:Body></soap:Envelope>"
    Any help on this will be greatly appreciated.
    Thanks In Advance.!

    Hi,
    According to your description, there is an issue when parsing result from the data retrieved using SPServices.
    By default, SPServices returns data as XML format, however, the JSON.parse() method “Throws a SyntaxError exception if the string to parse is not valid JSON”:
    https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse
    To extract the data needed from the response, you can either take the demo below for as a reference:
    http://spservices.codeplex.com/wikipage?title=GetListItems
    Or use the jQuery.parseXML() function:
    http://api.jquery.com/jquery.parsexml/
    Best regards
    Patrick Liang
    TechNet Community Support

  • Syntax Error with Table Parameter (type: ANY) when Creating Function Module

    Hello experts,
    I want to create a function module with a table parameter and table type is ANY. But when I check (Ctrl+F7) this function module, syntax error occurs - "In this statement, the internal table "MSG_TABLE_ITEM" must have the type "STANDARD TABLE"."
    Could anyone tell me what the wrong is? And how can I fix it?
    Thanks,
    Shelwin

    Hi,
    For table parameters, you can only pass
    MSG_TABLE_ITM   TYPE STANDARD TABLE
    or
    MSG_TABLE_ITM  ( don't fill other columns TYPING ASSOCIATED TYPE  ).
    For reference check FM 'GUI_UPLOAD' - Table parameters
    Regards,
    DPM

  • Syntax errors with ES freeze/hang FM

    Hi,
    I keep bumping into situations where a small syntax error causes FM to freeze, like there is a modal dialog open except there is no dialog. For example:
    doc = app.ActiveDoc();
    ...this is wrong because of the parenthesis, but rather than throwing any errors, FM just freezes and I can't get it unfrozen, except to kill it with the Task Manager. Is there a way to prevent this freeze or at least thaw it out? It's becoming tiresome to restart FM and reset locks, etc. with every little typo.
    Thanks,
    Russ

    Hi Russ,
    I think this won't help you, but I can reproduce this with app.ActiveDoc() and app.ActiveBook().
    With other properties I get a correct runtime error "app.AutoBackup() is not a function".
    So generally it works as expected, but not in these two cases.
    I think this is a problem of the script engine in these two cases. Perhaps there's an invisible (private) method defined, which is used internally, I don't know.
    Bye
    Markus

  • Illegal register: "icc" : syntax error with  Sun C 5.8 compiler

    I wanted to compile my C file with compiler option "cc -c -Xc -mt -fast -xarch=amd64" on Solaris 10 amd64 machine but it failed with following error -
    Assembler: abc.c
    "/tmp/GAAOBain6", line 819 : Illegal register: "icc"
    "/tmp/GAAOBain6", line 819 : Syntax error
    Near line: " orq %icc,%r8 ;/ line : 210"
    "/tmp/GAAOBain6", line 852 : Illegal register: "icc"
    "/tmp/GAAOBain6", line 852 : Syntax error
    Near line: " movzwq %icc,%r9 ;/ line : 215"
    cc: ube failed for abc.c
    *** Error code 2
    I am using following sun C compiler -
    /SS11/SUNWspro/bin/cc -V
    cc: Sun C 5.8 Patch 121016-02 2006/03/31
    Do anybody has idea about this issue?
    Thanks
    Sgupta

    Thanks Boris for your help.
    My abc.c file is following -
    struct struct_1 {
    unsigned type:8;
    unsigned level:5;
    unsigned seen:1;
    unsigned pad:2;
    unsigned length:16;
    void sample (unsigned char type)
    struct struct_1 *q;
    /*** Allocate and assign pBody here **/
    q->type = type;
    q->length = type;
    ==========================================
    compiling this file with following option gives the error in Sol-10 amd64 -
    /SS11/SUNWspro/bin/cc -c -Xc -mt -fast -xarch=amd64 abc.c
    But compiling without "-fast" options work fine.
    Thanks
    Sgupta

  • Syntax Error with creating object

    Hi,
    I am getting the following syntax error in the code below:
    non-staic variable this cannot be referenced from a static context
    job[ ] thread = new job(20);
    non-staic variable this cannot be referenced from a static context
    thread[index] = new job(index);
    public static void main (String[ ] args) {
    job[ ] thread = new job(20);
         for(int index=0; index < 20; index++) {
              input1[index]=index;
              input2[index]=index*2;
         for (int index=0; index < 20; index++) {
              thread[index] = new job(index);
              thread[index].start();
    Zulfi.

    Declare the nested class 'job' as static. Like "static class job" etc.

  • Syntax Error with SWF files on SH903i

    I'm using Flash Pro 8 and thought I'd try out creating a very
    simple SWF to test on the phone. Using the basic templates for
    Flash 1.0/1 and Actionscript 1... I made a simple bouncing circle,
    but I keep getting a "syntax error" when I try to download it into
    my phone via the phone web browser. Is there something I'm missing?
    It seems very straight-forward, but is there something I'm
    missing?

    I figured it out. I had to access the file directly.
    Oddly.

  • Firefox generates a javascript syntax error with ![CDATA[

    I have an app written in HTML5, SVG and javascript that ran until today. I uploaded 3.6.10, and now javascript reports a syntax error for the <![CDATA[ tag. Even when I remove the tag, the SVG will not run. I haven't made ANY changes to the app, just updated Firefox. What changed to break this?

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    A good place to ask questions and advice about web development is at the MozillaZine Web Development/Standards Evangelism forum.
    The helpers at that forum are more knowledgeable about web development issues.
    You need to register at the MozillaZine forum site in order to post at that forum.
    See http://forums.mozillazine.org/viewforum.php?f=25
    You need to post a link to the website or post relevant parts of the code.

  • Mysql syntax error

    Hi, I am trying to run the following query with JDBC. It works perfectly when done through a normal mysql admin tool but not with JDBC
    Apparently the error is on the last line. Do you guys know why?
    Cheers.
    CREATE TABLE archive (   ar_namespace int(11) NOT NULL default '0',   ar_title varchar(255)  NOT NULL default '',   ar_text mediumblob NOT NULL,   ar_comment tinyblob NOT NULL,   ar_user int(10) unsigned NOT NULL default '0',   ar_user_text varchar(255)  NOT NULL,   ar_timestamp binary(14) NOT NULL default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0',   ar_minor_edit tinyint(4) NOT NULL default '0',   ar_flags tinyblob NOT NULL,   ar_rev_id int(10) unsigned default NULL,   ar_text_id int(10) unsigned default NULL,   ar_deleted tinyint(3) unsigned NOT NULL default '0',   ar_len int(10) unsigned default NULL,   ar_page_id int(10) unsigned default NULL,   KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp),   KEY usertext_timestamp (ar_user_text,ar_timestamp));

    Hey thanks.
    It did work for the first query but broke the following. I am trying to query all of the following:
    CREATE TABLE archive (
      ar_namespace int(11) NOT NULL default '0',
      ar_title varchar(255)  NOT NULL default '',
      ar_text mediumblob NOT NULL,
      ar_comment tinyblob NOT NULL,
      ar_user int(10) unsigned NOT NULL default '0',
      ar_user_text varchar(255)  NOT NULL,
      ar_timestamp binary(14) NOT NULL default '\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0',
      ar_minor_edit tinyint(4) NOT NULL default '0',
      ar_flags tinyblob NOT NULL,
      ar_rev_id int(10) unsigned default NULL,
      ar_text_id int(10) unsigned default NULL,
      ar_deleted tinyint(3) unsigned NOT NULL default '0',
      ar_len int(10) unsigned default NULL,
      ar_page_id int(10) unsigned default NULL,
      KEY name_title_timestamp (ar_namespace,ar_title,ar_timestamp),
      KEY usertext_timestamp (ar_user_text,ar_timestamp))
    # Dump of table categorylinks
    #DROP TABLE IF EXISTS categorylinks
    CREATE TABLE categorylinks (
      cl_from int(10) unsigned NOT NULL default '0',
      cl_to varchar(255)  NOT NULL default '',
      cl_sortkey varchar(70)  NOT NULL default '',
      cl_timestamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
      UNIQUE KEY cl_from (cl_from,cl_to),
      KEY cl_sortkey (cl_to,cl_sortkey,cl_from),
      KEY cl_timestamp (cl_to,cl_timestamp)
    # Dump of table externallinks
    #DROP TABLE IF EXISTS externallinks
    CREATE TABLE externallinks (
      el_from int(10) unsigned NOT NULL default '0',
      el_to blob NOT NULL,
      el_index blob NOT NULL,
      KEY el_from (el_from,el_to(40)),
      KEY el_to (el_to(60),el_from),
      KEY el_index (el_index(60))
    ) New error:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CREATE TABLE categorylinks (
      cl_from int(10) unsigned NOT NULL default '0',
      ' at line 40It breaks at the line: CREATE TABLE categorylinks (
    Any ideas why?
    Cheers

  • Mysql.sock error with php

    Hi,
    I'm trying to get MySQL working on my Mac running OS X 10.5.1
    The server runs and I have imported one of my databases into
    it. However when I run Dreamweaver and try and add the new database
    I get this error in Dreamweaver;
    Can't connect to local MySQL server through socket
    '/var/mysql/mysql.sock' (38)
    Speaking with MySQL they have said that file is found in
    /tmp/
    I have copied it and added it where DW wants it but still no
    joy.

    there seems to be a simpler perm fix farther down the page-
    It can be much simpler.
    sudo cp /etc/php.ini.default /etc/php.ini
    sudo chmod 777 /etc/php.ini
    Open the file with a nice Editor, like PathFinder or BBEdit.
    Find the line for the mysql.default.host
    ; Default socket name for local MySQL connects. If
    empty, uses the built-in
    ; MySQL defaults.
    mysql.default_socket = /tmp/mysql.sock
    and enter: /tmp/mysql.sock
    You will then have:
    ; Default socket name for local MySQL connects. If
    empty, uses the built-in
    ; MySQL defaults.
    mysql.default_socket = /tmp/mysql.sock
    save it, go back to terminal and enter:
    sudo chmod 644 /etc/php.ini
    You then can restart Apache and SQL, or do a normal restart.
    It should work
    afterwards.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • MySQl syntax error near " at line 1 and Unknown column. Please help

    Hello again,
    I have another question. Just to refresh I am using DWCS3 with MAMP on my MBP Leopard 10.5.6.
    I have created a form with the form wizard and a Transitional <!DOCTYPE>
    I have added the php validation code pages 481 to 485 The Essential Guide to Dreamweaver.
    I saved it and uploaded it to the testing server clicked the "insert form" button,and  I got;
    You have an error in your SQL syntax; Check the manual that corresponds to your MySQL server version for the right syntax to use near " at line 1
    The MySQL version I am using is 5.0.37. I have gone over and over the code and I can't find what is wrong with it.
    Also for the username column, I am now getting a message;
    'Unknown column'  'ella1' in 'where clause'
    I have researched it on the web and possible answers are that my columns are misspelled, the column doesn't exist or username is not in the query.
    I have checked all of these and I really can't see the problem, but there obviously is one.
    Please can someone help.
    Thanks again.
    P.S. I have attached the page in a .zip file if anyone wouldn't mind having a look.

    No, I'm talking about the dot before.
    Change this
    .$row_detailsRS[$details_prodID] . "";
    to this
    . $row_detailsRS[$details_prodID] . "";
    in both places.

  • MySQL Sytax error with master and detail pages

    Master and Detail pages.
    I get an SQL error when I click on an Item in the Master
    page.
    “You have an error in your SQL syntax; check the manual
    that corresponds to your MySQL server version for the right syntax
    to use near 'ID = 16 LIMIT 0, 10' at line 1 “
    If I try to open the detail page I get
    “You have an error in your SQL syntax; check the manual
    that corresponds to your MySQL server version for the right syntax
    to use near 'ID = -1 LIMIT 0, 10' at line 1 “
    I created this pair by simply clicking on Insert/data object/
    master detail page.
    I have tried this various ways, but always get the same
    result.
    Is there a bug in CS3?

    Sorry I have solved it myself.
    I had accidentally put a space in a table header in the mySQL
    data bank.
    All works well now.

Maybe you are looking for