|
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
As an Amazon Associate we earn from qualifying purchases.
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.