Learn how to a build a cloud-first strategyRegister Now


Chgcurlib from VB.net

Posted on 2009-12-29
Medium Priority
Last Modified: 2013-11-26
Hello Experts

when i run the below code it errors out.  it gives me error SQL0104.

i have been able to call RPG programs but i am not successfull in changing the library.
Dim myAS400OleDbConnection As New OleDbConnection("Provider=IBMDA400;Data Source=IP;User Id=UID;Password=PWD;")

            Dim myAS400OleDbCommand2 As New OleDbCommand
            Dim Cha As String = "Call Qsys.chgcurlib LibName"

            myAS400OleDbCommand2.Connection = myAS400OleDbConnection
            myAS400OleDbCommand2.CommandText = Cha




Open in new window

Question by:AsishRaj
  • 2
LVL 36

Expert Comment

by:Gary Patterson
ID: 26142548
CHGCURLIB is a command, not a program.  You don't CALL commands (actually "CALL" is a command), you invoke them directly.

Try this:

Dim Cha as String = "CHGCURLIB libname"

- Gary Patterson

Check out my EE profile: http://www.experts-exchange.com/M_4382324.html

Author Comment

ID: 26142593
Hello Gary

Thank for responding. i have already tried what you suggested but same problem.

i have tried
Dim Cha As String = "Call Qsys.chgcurlib imassogo"
Dim Cha As String = "Call chgcurlib imassogo"
Dim Cha As String = "Qsys.chgcurlib imassogo"
Dim Cha As String = "chgcurlib imassogo"

But none works

Accepted Solution

AsishRaj earned 0 total points
ID: 26142867
I managed to get it working using below call

CALL QSYS.QCMDEXC('chgcurlib curlib(imassogo)',0000000026.00000)

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses
Course of the Month20 days, 14 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question