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



Hi all,

I am getting the following error when I try to insert records into a sql
server database file

RNX0301 Escape 50 10/04/07 11:08:23.184696
QRNXIE QSYS *STMT JDBCR4 ARNDT3 *STMT
From module . . . . . . . . :
QRNXMSG
From procedure . . . . . . :
SignalException
Statement . . . . . . . . . :
20
To module . . . . . . . . . :
JDBCR4
To procedure . . . . . . . :
JDBC_EXECPREPUPD
Statement . . . . . . . . . :
2925
Message . . . . : Java exception
received when calling Java method.
Cause . . . . . : RPG procedure
JDBC_EXECP in program ARNDT3/JDBCR4 received
Java exception "
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot
insert explicit value for identity
column in" when calling method
"executeUpdate" with signature "()I"
in class "java.sql.PreparedStatement".
Recovery . . . : Contact the
person responsible for program maintenance
to determine the cause of the
problem. Technical description . . . . . . . .
: If the exception indicates that
the Java class was not found, ensure the
class for the method is in the class
path. If the exception indicates that
the Java method was not found, check
the method name and signature. If the
signature is not correct, change the
RPG prototype for the method, or change
the Java method, so that the return
type and parameter types match. You can
determine the signatures for all the
methods in class XYZ using command QSH
CMD('javap -s
XYZ').

Here is the code I am running.


stmt = JDBC_PrepStmt(conn : 'Insert Into ClientProfile '
+ '(Id,ClientCode,Name,Country)'
+ ' values (?,?,?,?)');
if (stmt = *NULL);
return *OFF;
endif;


// set values to be inserted into file
JDBC_setDecimal(stmt:1:clientds.RECID);
JDBC_setString(stmt:2:Clientds.CLIENTID);
JDBC_SetString(stmt:3:clientds.CLIENTNAME);
JDBC_SetString(stmt:4:clientds.CLINTCNTRY);

rc = JDBC_ExecPrepUpd( stmt );
if (rc < 0);
return *OFF;
endif;

RC = -1 when it finishes

Any Help would be great.

Thanks

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.