ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

C# .NET error...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • C# .NET error...

    I have this source code and i get an error.

    Code:
                    cwbx.AS400System AS400 = new cwbx.AS400SystemClass();
                    AS400.Define("DLYA7");
    
                    cwbx.Program AS400Program = new cwbx.Program();
                    AS400Program.system = AS400;
                    AS400Program.system.UserID = "GENEXUS";
                    AS400Program.system.Password = "GENEXUS";
    
                    cwbx.Command AS400Command = new cwbx.Command();
                    AS400Command.system = AS400;
                    AS400Command.Run("WRKOBJ OBJ(*ALL/PRTEOPCK)");
    
                    AS400.Signon();
    Please help me.
    Sorry my writing, i talk spanish.
    i want get the date of the object but the error is in the line

    Code:
                    cwbx.AS400System AS400 = new cwbx.AS400SystemClass();
    The error is:
    Code:
    Error retrieving a COM class factory for component with CLSID {86F9DB12-15D5-11D2-849C-0004AC94E175} because the following error: 80040154.
    sorry again for my writin i don't talk english
    thanks.

  • #2
    Re: C# .NET error...

    I think you want the first line to be:

    cwbx.AS400System AS400 = new cwbx.AS400System();
    Jonas Temple
    Got FROG?
    Got Tadpole? No, because it's not done yet! Stay tuned....

    01010111 01100001 01110011 01110011 01110101 01110000 00100000 01100100 01101111 01100111 00111111

    Comment


    • #3
      Re: C# .NET error...

      jtemple:
      So I tried and the error is the same

      thk.

      Comment


      • #4
        Re: C# .NET error...

        From the msdn forums it sounds like you have not fully installed Client Access on that PC. Try to reinstall (best full install) CA and make sure you have the current fixpack for your version. In most cases this error is reported if you try to compile for 64 bit versions. Try to change target plattform to 32 bit (x86) ...
        Sven

        The best way to prove your knowledge is to share it ...

        Comment


        • #5
          Re: C# .NET error...

          Originally posted by sms_mitschs View Post
          ..... Try to change target plattform to 32 bit (x86) ...
          That's the solution, thanks you.

          Now i have to try to get the date of the object.

          Comment


          • #6
            Re: C# .NET error...

            .... fine ...
            But the output of wrkobj is not that easy to catch ... because it is ran in an batch job you will get a spool file ...
            Better to use DSPOBJD and direct the output to a database file and use ODBC access for reading the data through a record set ...
            Sven

            The best way to prove your knowledge is to share it ...

            Comment


            • #7
              Re: C# .NET error...

              Originally posted by sms_mitschs View Post
              .... fine ...
              direct the output to a database file...
              How can i do this? From the command?
              i'm executing this command "DSPOBJD OBJ(BTWEBTEST/PRTEOPCK) OBJTYPE(*ALL) DETAIL(*FULL)" (this is a example)


              thk again

              Comment


              • #8
                Re: C# .NET error...

                Originally posted by mikolbe View Post
                How can i do this? From the command?
                i'm executing this command "DSPOBJD OBJ(BTWEBTEST/PRTEOPCK) OBJTYPE(*ALL) DETAIL(*FULL)" (this is a example)


                thk again
                This is the answer: DSPOBJD OBJ(BTWEBTEST/PRTEOPCK) OBJTYPE(*ALL) DETAIL(*FULL) OUTPUT(*PRINT).
                This generates a SPOOL, now i have to read this.

                Thank you all to all.

                Comment


                • #9
                  Re: C# .NET error...

                  You need to change the OUTPUT to *OUTFILE. Then specify the library and file name for the output. Don't use QTEMP in this scenario because when you make a database connection to retrieve the data, that connection's QTEMP is different from the QTEMP used by the connection you used to run the command. Another option that wouldn't require you to use two connections would be to call the QUSROBJD API to retrieve the data.

                  Jonas Temple
                  Got FROG?
                  Got Tadpole? No, because it's not done yet! Stay tuned....

                  01010111 01100001 01110011 01110011 01110101 01110000 00100000 01100100 01101111 01100111 00111111

                  Comment


                  • #10
                    Re: C# .NET error...

                    Well, thank you all for all.
                    I finish, it's working fine with the command DSPOBJD

                    thank from Uruguay

                    <<[[Mikol Be]]>>

                    Comment

                    Working...
                    X