If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Running utilities using ADO

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-03, 10:23
skg1 skg1 is offline
Registered User
 
Join Date: Dec 2003
Posts: 9
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
Reply With Quote
  #2 (permalink)  
Old 12-18-03, 15:30
GertK GertK is offline
Registered User
 
Join Date: Nov 2003
Location: Netherlands
Posts: 96
Re: Running utilities using ADO

Quote:
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
Reply With Quote
  #3 (permalink)  
Old 12-18-03, 15:39
skg1 skg1 is offline
Registered User
 
Join Date: Dec 2003
Posts: 9
Re: Running utilities using ADO

Quote:
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On