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


  • Subject: Problems fetching data when passing AS400 object to Connection.connect()
  • From: "Vijosh A." <vijosh@xxxxxxxxxxxx>
  • Date: Wed, 4 Apr 2001 16:10:52 +0530
  • Importance: Normal

Title:

My application requires a System connection (for accessing data queues..etc.) as well as Database connection. The user has to login once. This is to make the AS400 object. This object is passed into the Connection class.

  com.ibm.as400.access.AS400JDBCDriver d = new com.ibm.as400.access.AS400JDBCDriver();
  com.ibm.as400.access.AS400 x = new     com.ibm.as400.access.AS400   ("myserver",userID,passWord);
   x.setGuiAvailable(false);
 Connection c = d.connect (x);

Now to fetch using SQL with this connection I need to build my SQL in the following way -
        "select * from mylibrary.filename  ( I need to give the library name, although Library list for QUSER and the user's JOBD is set to - mylibrary )

Whereas if I have the connection in the following way -

        Connection c=  DriverManager.getConnection"jdbc:as400://myserver/mylibrary","username","password")

Then I can write my SQL statements in the following way -
        "Select * from filename. ( Here I do not need to give the library name)

Can anyone suggest a way by which I can avoid giving library name in  SQL statements in the first case (i.e. Connection c=d.connect(x) ?

Thanx

Cheers

Vijosh

 

 


--------------------------------------------------------------
Systems & Software, Mumbai, India

Sent using "The PostMaster" by QuantumLink Communications

One Internet account, unlimited personal e-mail addresses
Get your free copy of "The PostMaster" at http://www.qlcomm.com/

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.