Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2003
    Posts
    3

    Unanswered: [Informix][Informix ODBC Driver]General error.Syntax error

    Hi,

    I'm connecting to Informix 7.31 UC3 on HP-Unix from Win 2k using client-sdk ver 2.80 TC1.

    I'm trying to insert a record fom an VB application.

    The insert statement is
    "INSERT INTO
    pdmcontracttraffic
    (contracttrafficid,
    contractid,
    contractnum,
    clientid,
    clientname,
    earliestflstart,
    latestflend,
    traffstatusid,
    entrydate,
    employeeid)
    SELECT DISTINCT
    0,
    pdmcontract.contractid,
    pdmcontract.contractnum,
    pdmclientagency.clientagencyid,
    pdmclientagency.name,
    MIN(pdmlineitem.currentstart),
    MAX(pdmlineitem.currentend),
    11,
    '2003-09-05 11:32:58',
    1145
    FROM
    pdmcontract,
    pdmclientagency,
    pdmlineitem
    WHERE
    pdmlineitem.contractid = pdmcontract.contractid AND
    pdmcontract.clientid = pdmclientagency.clientagencyid AND
    pdmcontract.contractid in (620) AND
    pdmcontract.contractid not in(select contractid from pdmcontracttraffic)
    GROUP BY
    pdmcontract.contractid,
    pdmcontract.contractnum,
    pdmclientagency.clientagencyid,
    pdmclientagency.name"

    I'm getting an error saying "[Informix][Informix ODBC Driver]General error.Syntax error".

    But if I run the sql in dbaccess query utility on HP Unix, it works fine.

    Can somebody resolve my issue??

    Thanks in advance

  2. #2
    Join Date
    Sep 2003
    Posts
    1
    I'm no expert, but have you tried seperating the two statements with a semicolon ';'

    I suspect that dbaccess is clever enough to see you are running two seperate sql statements and do each one at a time, I think the ODBC api prepare funtions aren't that clever.

    regards

  3. #3
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    Hi,

    What odbc driver do you use? csdk version?
    You can download the latest one from th eevaluate ibm/informix site.
    rws

  4. #4
    Join Date
    Sep 2003
    Posts
    3
    Hi
    I was using 2.80 TC1. I upgraded that to 2.81 TC1. It's working fine now.

  5. #5
    Join Date
    Aug 2002
    Location
    Belgium
    Posts
    534
    Ok - this was a known issue.
    rws

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •