If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > [Informix][Informix ODBC Driver]General error.Syntax error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-03, 05:07
prasannavs prasannavs is offline
Registered User
 
Join Date: Sep 2003
Posts: 3
[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
Reply With Quote
  #2 (permalink)  
Old 09-16-03, 06:33
jacfrosty jacfrosty is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 09-16-03, 10:03
Roelwe Roelwe is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 09-17-03, 00:29
prasannavs prasannavs is offline
Registered User
 
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.
Reply With Quote
  #5 (permalink)  
Old 09-17-03, 04:20
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
Ok - this was a known issue.
__________________
rws
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On