Normal Topic JDBC Connection? (Read 541 times)
Robert Manshack
Member
*
Offline



Posts: 31
Joined: Jun 26th, 2014
JDBC Connection?
Nov 15th, 2016 at 10:34pm
Print Post Print Post  
On the surface this seems simple to me.  I need to run a query against a DB2 database from inside a Sesame application.  The purpose would be to get a few elements from a row in a table and put those elements into fields on a sesame screen.  Can I use a JDBC connection in any shape or form to run from SBasic to run the query and get the data back?

Our company has DB2 running on a mainframe.  JDBC is the cleanest way to grab data without installing DB2 Connect so you have the ODBC option.  That being said, would an ODBC option work to run a query, grab some data and bring it back to the data entry screen?

The cleanest option would be for the user to enter, for example, a work order number and press "Search".  The search button they press would fire off the query and parse the results and fill in the fields on the screen.  I would gladly entertain less clean options as well.  Anything that's technically possible.....I have a pretty good imagination for these sorts of things.  Smiley

-Robert
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: JDBC Connection?
Reply #1 - Nov 27th, 2016 at 2:57pm
Print Post Print Post  
If your only access is through JDBC, you should probably consider using one of the many JDBC command line clients available. Some of these are likely to use standard I/O and could be invoked from Sesame using redirect. We have done this using other SQL command line clients.

If none of the JDBC prefabricated clients support standard I/O with redirection, you many have to write a small Java program to read standard input (or a file) to get the query, that queries the SQL database, and uses standard output (or a file) to send the result back to Sesame.

It has been my experience that DB2 supports many SQL clients, not just JDBC. You may be able to use any SQL command line client and redirection. If not in this case, you may be able to have IT reconfigure.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged