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



I have been using Scott K's JDBC service pgm for some time with great
results against my WIN DB2 tables. I do very simple things like read and
update these tables. This morning I had an issue running the same pgm
that had run last Friday night without any problem. This morning when I
ran my pgm, no errors were kicked out BUT my Win DB2 table did not get
updated. My SELECT to read rows worked fine. I use the following to
update:

stmt = JDBC_PrepStmt(conn: 'UPDATE DCMS.WEB_PAYMENT '
+ 'set UPDATE_USERID = ? , '
+ 'UPDATE_TIMESTAMP = ? , '
+ 'PROCESS_NOTE = ? , '
+ 'ORTHO_SYS_PROCESSED = ? '
+ 'where '
+ 'CHART_OFFICE = ? '
+ 'and CHART_NUMBER = ? '
+ 'and TRANSACTION_DATE = ? '
+ 'and TRANSACTION_NUM = ? ');

if (stmt = *NULL);
ErrMsg = 'Prepare Statement failed!';
return;
endif;

JDBC_setString (stmt: 1: wUserID );
JDBC_setTimeStamp(stmt: 2: %timestamp() );
JDBC_setString (stmt: 3: wProcNote );
JDBC_setString (stmt: 4: 'Y' );
JDBC_setInt (stmt: 5
: %int(JDBC_GetColByName(rs:'CHART_OFFICE')));
JDBC_setInt (stmt: 6: dCHART );
JDBC_setDate (stmt: 7
: %date(JDBC_GetColByName(rs
: 'TRANSACTION_DATE'): *iso));
JDBC_setString (stmt: 8
: JDBC_GetColByName(rs:'TRANSACTION_NUM'));

RowCount = JDBC_ExecPrepUpd( stmt );
if (RowCount < 0);
ErrMsg = 'Execute Prepared Failed!';
return;
endif;
RowCount was 0. Does this mean no rows were updated or just that the
operation completed without error?
Also, is there a way of viewing the contents of the SQL UPDATE statement
as it will be executed
I am just not sure how to debug this problem as I can't seem to find any
error. Any help is appreciated. 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.