× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



You need to start commitment control prior to using COMMIT keyword (i.e.
in CL STRCMTCTL).

-----Original Message-----
From: c400-l-bounces@xxxxxxxxxxxx [mailto:c400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Jaime JLO. López Ortega
Sent: Tuesday, February 25, 2003 7:47 AM
To: c400-l@xxxxxxxxxxxx
Subject: [C400-L] SQLCODE Error in ILE C

Hi!

I have started for a short time to programm with ILE C and embedded SQL.
I want to insert/update in one table whatever I do (Update/insert) I get
the following SQLCODE = -7008. I had a look to the SQL Classes and Codes
and it says "The table is in an invalid state for the operation". 
The code looks something like that:

 #include <stdio.h>
 #include "mystuff.h"

 int main(int argc, char* argv[])
 {
    int  i;

    EXEC SQL INCLUDE SQLCA;

    EXEC SQL
      INSERT INTO MARIS/PCS001PF
         VALUES ('name', 'VALUE');

    if (SQLCODE == 0)
    {
       printf("It works");
    }
   else
    {
       printf("ERROR SQLCODE=%d \n",SQLCODE);
    }

    EXEC SQL
      COMMIT;

    printf("End"); 
}
Thanks for any ideas and yout time.
jaime

_______________________________________________
This is the C programming iSeries / AS400 (C400-L) mailing list
To post a message email: C400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/c400-l
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/c400-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.