Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-10-2004, 10:39 AM
helena helena is online now
Registered User
 
Join Date: 02-10-2004
Posts: 1
Call VBP steps from within script?

Is there anyway to call a VBP step from within a Script block?

The problem that I'm trying to solve is that I have a folder filled with .sql files. Each file name starts with a number, such as 100, 200, 1100, and the sql files need to be run in numeric order (rather than alphabetical).

I created a jscript step that would go through all the files in the directory and stick the paths into an array so that they're in the correct order.

After all the files are ordered correctly, I would like to run the all the sql files in the appropriate order. This is where I run into the problem. How do I run all these file in the correct order?

Ideally, I'd like to loop through all the items and call the Run Sql step with the information or run the %DOSCMD% with the correct command from within the script code. I haven't been able to figure out how to call any VBP steps from within the script, or how to pass the list of file paths out to another step to run all of them in order.

Any ideas?

Thanks!
Reply With Quote
  #2  
Old 02-10-2004, 12:24 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
There isn't a way to call a step from script.

Instead of populating an array in JScript, use vbld_AddDelimValue() to populate a tab delimited macro.

Then iterate over the macro values with vbld_NextDelimValue() calling the Run Sql action for each value (see the Misc.bld sample for details).

Also see this thread: http://www.kinook.com/Forum/showthread.php?threadid=231

Kevin
Reply With Quote
  #3  
Old 03-01-2004, 04:41 AM
VBPbetaTest VBPbetaTest is online now
Registered User
 
Join Date: 11-18-2003
Posts: 8
Using vbld_AddDelimValue() and then calling the Run Sql action could be a good idea. The only problem could be the performance (

Another way could be to create directly by script the project (with the VBPro object model) which will lauch step by step each stored procedure and then to launch it after. But each step has to connect to the database, so you will lose always the same amount of time.

But every day, I have to install 3500 stored procedures and this way takes me 15 minutes if I use this method.

To reduce that time at 5 minutes, we had to create a visual basic code (attached with this message). The idea is to use ADO directly keeping the connexion to the database always opened.

I haven't fund the time to translate it in VBScript but I'm sure you
could easily. But I will do it... one day ;o)

"Le petit frenchy"
NB: Sorry for my english ;o)
Attached Files
File Type: zip installsp.zip (45.3 KB, 1373 views)
Reply With Quote
Reply


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



All times are GMT -5. The time now is 06:23 PM.


Copyright © 1999-2023 Kinook Software, Inc.