Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    9

    Unanswered: Running utilities using ADO

    Hi,

    I am trying to run a DB2 utility called runstats (to analyze tables) using ADO. I have tried the recordset and Command objects. But I get an error saying that SQL did not inerpret this command, and was expecting <JOIN> keyword.

    I am using IBM's ODBC driver and my DB2 is on Windows. I want to run DB2 utilities using an ADO application.

    Any ideas?

    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Netherlands
    Posts
    96

    Re: Running utilities using ADO

    Originally posted by skg1
    Hi,

    I am trying to run a DB2 utility called runstats (to analyze tables) using ADO. I have tried the recordset and Command objects. But I get an error saying that SQL did not inerpret this command, and was expecting <JOIN> keyword.

    I am using IBM's ODBC driver and my DB2 is on Windows. I want to run DB2 utilities using an ADO application.

    Any ideas?

    Thanks
    runstats isn't a SQL statement. You need to run it as a system command ('db2 runstats on table...') or using the db2Runstats API.

    regards, Gert

  3. #3
    Join Date
    Dec 2003
    Posts
    9

    Re: Running utilities using ADO

    Originally posted by GertK
    runstats isn't a SQL statement. You need to run it as a system command ('db2 runstats on table...') or using the db2Runstats API.

    regards, Gert

    Can you suggest how I can run it as a systems command from a VB application? At present I am calling the shell to run the batch script which executes the runstats command. But this also means that I need to copy the DOS batch script everytime I install the application.

    Is there any other way to do it, for example, by using some VB object?

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •