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



On 3/25/2015 3:54 PM, Barb Hines wrote:
I am using Scott Klements' JDBCR4 freeware, and attempting to access an SQL table and return the results to a green screen display. I can connect without issue.
I'm sure this must be a very simple thing to do, but I'm unable to get display results.

Does anyone have a program example they would be willing to share?

I have an RPG example:

// Prepare SQL statement string
prepstm = JDBC_prepStmt(conn:
'SELECT * FROM information_schema.columns order by table_name');

if (prepstm = *NULL);
jdbc_close(conn);
return;
endif;

// Query the database
rs = jdbc_ExecPrepQry(prepstm);

dow (jdbc_nextRow(rs));
tableName = jdbc_getColByName(rs: 'table_name': nullInd);
if nullind = *on;
tableName = 'NULL';
endif;
...
except prtRow;
enddo;

JDBC_FreeResult(rs);
JDBC_FreePrepStmt(prepstm);
JDBC_Close(conn);

You might find more people using this over in the RPG list.


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.