• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Use System Naming Convention and Library List with .NET Managed Provider

    October 13, 2004 Michael Sansoterra

    The iSeries .NET managed provider, first released in iSeries Access V5R3, lacked the ability to specify a library list and the SQL naming convention in connection strings. We were stuck with the defaults. However, with the introduction of service pack SI15176, in early September, IBM has enhanced the provider to set the library list and naming convention in the connection string.

    For those unfamiliar with the concept of a managed data provider, it is .NET’s plug-in equivalent to an ODBC driver in the Windows world or a JDBC driver in the Java world. Each database manufacturer creates a .NET provider to let .NET programs access data from their respective database. While .NET programs can use ODBC and OLE DB data sources, a database provider written specifically for .NET will perform better because special calls don’t need to be made to execute code written outside of the .NET framework (which is the case when using ODBC and OLE DB data access.)

    Below is a C# example of establishing a connection using the two new properties:

    
    private void ReadData()
    { 
          //
          // Naming Convention Values:  System 
          //                            SQL
          //
          iDB2Connection connDB2=new iDB2Connection( 
                  "DataSource=your400.yourcompany.com;" + 
                  "userid=MIKE;password=MYPASSWORD;" +
                  "LibraryList=*USRLIBL;Naming=System");
    
          iDB2Command cmdDB2=new iDB2Command(
                  "Select * From DataFile",
                   CommandType.Text, connDB2);
    
          iDB2DataReader drDB2;
    
          connDB2.Open();
          drDB2=cmdDB2.ExecuteReader();
    	  while(drDB2.Read())
          {
                       // Do something here
          }
          drDB2.Close();
          connDB2.Close();
    }
    

    The two new property names in the connection string are LibraryList and Naming. Unfortunately, the Programmer’s Toolkit help file was not updated with these new properties, so here is a brief explanation of each.

    LibraryList accepts a comma delimited list of libraries. Additionally, the *USRLIBL keyword can be specified to indicate the user library list should be used (the user library list will be inherited from the job description of the user ID used to establish the connection). Further, *USRLIBL can be used as a place holder for adding additional libraries. For example, LibraryList=*USRLIBL,TESTDATA will add the library TESTDATA after the user library list. Likewise, specifying LibraryList=TESTDATA,*USRLIBL will place TESTDATA first in the library list. As far as I can tell, this functionality is identical to the iSeries Access ODBC driver’s ability to set the library list.


    Naming accepts a value of System to indicate the system naming convention should be used, and SQL to indicate that the SQL naming convention should be used (SQL is the default). The basic difference between the two is the separator character and the system convention’s ability to use the library list for unqualified table names.

    For those of us getting to speed on .NET, IBM has made life easier because we don’t have to worry about some of the complexities of SQL programming using the SQL naming convention.

    For more information on these new properties, see the “ReadMeSP.txt” file that comes with SI15176.

    Michael Sansoterra is a programmer/analyst for i3 Business Solutions, an IT services firm based in Grand Rapids, Michigan. Click here to contact Michael Sansoterra by e-mail.

    Editor’s Note: Lorie DuBois, the developer responsible for the DB2 UDB .NET Data provider for iSeries, at IBM Rochester, had a clarification of the following sentence: “As far as I can tell, this functionality is identical to the iSeries Access ODBC driver’s ability to set the library list.” According to DuBois: “Our functionality is almost the same as the ODBC driver’s. The difference is with how we handle the Default Collection property. With ODBC, they add the Default Collection property to the library list. The .NET provider chose not to do this. With the .NET provider, if you want the Default Collection library in the library list, you must specifically include it.”

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    ARCAD Software

    DevSecOps & Peer Review – The Power of Automation

    In today’s fast-paced development environments, security can no longer be an afterthought. This session will explore how DevSecOps brings security into every phase of the DevOps lifecycle—early, consistently, and effectively.

    In this session, you’ll discover:

    • What DevSecOps is and why it matters?
    • Learn how to formalize your security concerns into a repeatable process
    • Discover the power of automation through pull requests, approval workflows, segregation of duties, peer review, and more—ensuring your data and production environments are protected without slowing down delivery.

    Whether you’re just getting started or looking to enhance your practices, this session will provide actionable insights to strengthen your security posture through automation and team alignment to bring consistency to the process.

    Watch Now!

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    BOSaNOVA and Wyse Look to the High End of Thin Clients IBM Completes i5 Squadrons with 64-Way Model 595

    Leave a Reply Cancel reply

Volume 4, Number 34 -- October 13, 2004
THIS ISSUE
SPONSORED BY:

T.L. Ashford
ProData Computer Svcs
WorksRight Software

Table of Contents

  • Anatomy of a P-Field
  • Use System Naming Convention and Library List with .NET Managed Provider
  • Handling Oversized Numbers Gracefully

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • What You Will Find In IBM i 7.6 TR1 and IBM i 7.5 TR7
  • Three Things For IBM i Shops To Consider About DevSecOps
  • Big Blue Converges IBM i RPG And System Z COBOL Code Assistants Into “Project Bob”
  • As I See It: Retirement Challenges
  • IBM i PTF Guide, Volume 27, Number 41
  • Stacking Up Power11 Entry Server Performance To Older Iron
  • Big Blue Boosts IBM i Support In Instana, Adds Tracing
  • It Is Time To Tell Us What You Are Thinking And Doing
  • IBM i PTF Guide, Volume 27, Number 40
  • The GenAI Boom Is Only Slightly Louder Than The Dot Com Boom

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle