ConnectionString ado.net and iseries

  • Thread starter Thread starter Claudia Murialdo
  • Start date Start date
C

Claudia Murialdo

How can I specify the Data Library and Program Library in the
connection string of idb2Connection?
I want to call a stored procedure in a Program Library "MyPLIB", and
this procedure access the Data Library "MyLIB".

When I call the procedure I get de error: "External Program
'myprogram' not found".

How can I set these options in the connection string?.
 
Let's see your connection string.
What provider are you using and what backend?

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Thanks for the replies.

My code is:

iDB2Connection con= new iDB2Connection("Data
Source=xxx.xxx.xxx.xxx;User Id=test;Password=test;Default
Collection=DataLibrary;");
con.Open();
iDB2Command cmd= new iDB2Command( "PlibraryA.PROC1", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.DeriveParameters();
cmd.Parameters[0].Value="parmvalue0";
cmd.Parameters[1].Value="parmvalue1";
iDB2DataReader reader= cmd.ExecuteReader();

I'm using the .NET Data Provider for iSeries in the Beta for iSeries
Access for Windows product (
http://www-1.ibm.com/servers/eserver/iseries/access/windows/beta.html
) with as400.

This code is ok, but there are several "Program Library", for example,
there are PlibraryA, PlibraryB, PlibraryC. How can I specify all this
libraries in the connection string and use new iDB2Command( "PROC1",
con); instead of new iDB2Command( "PlibraryA.PROC1", con); ?
 
Claudia,
Have you tried asking in the iSeries Network forums?

http://www.iseriesnetwork.com/

I currently don't have access to an iSeries to try the new beta, however
what I normally do is to associate a job description with the AS/400 user
id, this job description would have the library list set to all the program
libraries. Allowing you to use PROC1 instead of LIB1.PROC1 for the stored
procedure names.

I seem to remember the new iSeries OleDb providers have a Library List
keyword on its connection string, does the new ADO.NET provider have one
also?

Hope this helps
Jay
 
Jay,
I'm going to try in the iSeries Network forums, thanks you.
The OleDb providers have a Library List keyword so I think should be
somethink like these in ADO.NET Data provider but I didn´t find it.
 
Back
Top