× 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.



What's wrong with this picture?

     C/EXEC SQL
     C+ INSERT INTO ROB/TESTSQL2 VALUES('c', 'd')
SQL0084S Position 9 SQL statement not allowed.
     C/END-EXEC
      /free
       dsply sqlstate;
       dsply sqlcode;
      /end-free



DSPMSGD RANGE(SQL0084)
        *MSGF(QSYS/QSQLMSG) 

Message . . . . :   SQL statement not allowed.  
Cause . . . . . :   The SQL statement is not allowed for one of the 
following 
  reasons:  
    -- DECLARE CURSOR, DECLARE STATEMENT, FETCH, OPEN, CLOSE, WHENEVER,  
  PREPARE, EXECUTE, EXECUTE IMMEDIATE, INCLUDE, DECLARE TABLE, DECLARE  
  VARIABLE, DECLARE PROCEDURE, and DESCRIBE are not allowed in interactive 
 
  SQL, dynamic SQL, or using the RUNSQLSTM command.  
    -- BEGIN DECLARE SECTION and END DECLARE SECTION are not allowed in  
  interactive SQL, in dynamic SQL, in RPG, or in REXX.  
    -- A blocked INSERT statement is not allowed in interactive SQL or 
dynamic
  SQL.  
    -- The CONNECT, SET CONNECTION, RELEASE, and DISCONNECT statements are 
not
  allowed in dynamic SQL. CONNECT with constants specified for user ID and 
 
password is not allowed in a precompiled program.  
  -- SELECT cannot be issued from an EXECUTE IMMEDIATE statement or the  
RUNSQLSTM command.  
  -- The SET OPTION statement is only allowed in REXX, in a precompiled  
program, or in SQL routines.  In a precompiled program, it must be the 
first
SQL statement in the program.  
  -- DECLARE STATEMENT, DECLARE VARIABLE, DECLARE PROCEDURE, INCLUDE, 
SELECT
INTO, WHENEVER, blocked INSERT, and blocked FETCH statements are not 
allowed
in REXX.  
  -- The SET TRANSACTION statement is not allowed when the current  
connection is to a remote database.  
  -- The SQL statement specified is not a valid statement on the current  
release of DB2 UDB for iSeries.  The statement may be valid on a future  
release of DB2 UDB for iSeries or on a system other than an iSeries.

Rob Berendt
-- 
"They that can give up essential liberty to obtain a little temporary 
safety deserve neither liberty nor safety." 
Benjamin Franklin 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.