Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9166515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:10:05+00:00 2026-06-17T15:10:05+00:00

I have a requirement to perform basic SQL (an insert, in this case) against

  • 0

I have a requirement to perform basic SQL (an insert, in this case) against a file on the AS400. I’m writing a thick client, command line app in C# running on Windows 2008.

If I specify a library and a file as follows:

insert into somelibrary.somefile (col1,col2) values val1,val2

then it works. The problem is that the value of somelibrary will differ between users and environments. I’d like to use the library list *LIBL, so that it will pick up on whatever libraries that user has been allocated, in the correct order. I’d like to avoid having to use configuration files, if possible.

The user I’m testing with has, in his library list, the library which contains somefile. If I try:

insert into somefile (col1,col2...) values val1,val2

I get an error:

ERROR [42S02] [IBM][System i Access ODBC Driver][DB2 for i5/OS]SQL0204 - somefile in username type *FILE not found.

I’ve tried adding *LIBL in the SQL, and also in the connection string, but it’s not finding the file. I’ve tried quite a few combinations, as well as using slashes to separate the library and the file.

In case it’s relevant the connection string is:

Driver={Client Access ODBC Driver (32-bit)}; System=" + server + "; UID=" + DBUser + "; PWD=" + DBPassword + ";";
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T15:10:06+00:00Added an answer on June 17, 2026 at 3:10 pm

    The library list used for this request is the library list of the user profile used to authenticate against. The user profile points to two items that are interesting with respect to the library list: the Job Description and the Initial Program. Check the job description to see what the library list is. Probably, it won’t have the library containing SOMEFILE. That leaves the initial program. If the library list is set in the initial program, you have a problem, because the initial program is only executed when the profile signs on to a terminal session.

    The way around this is to create a user profile and job description that has the library list you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a requirement. Given say Test1,Test2, I have to perform a like operation.
I have requirement to disable copy/paste/cut operations on a textbox. For this purpose I
My Application can perform 5 business functions. I now have a requirement to build
We have a command line exe that takes input from a text file and
I have a requirement to perform HTTP authentication logic within a servlet application, rather
I have a requirement to perform an indexed search across content which must include
I have a requirement for an app to communicate with a server, this communication
I have a requirement to build features that perform certain background tasks on a
I have a requirement to Perform the SHA1 hashing on the UTF-8 bytes of
I have a requirement in my application where we have to perform certain activities

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.