Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-09-2005, 11:07 AM
posix337 posix337 is online now
Registered User
 
Join Date: 06-09-2005
Posts: 3
Question Data Driven VBP ???

Hello!

We are in a process of converting our CD production processes into a data driven automated solution.

We have a database (SQL Server) that contains a list of file locations in Perforce. This is on the order of ~500 files.

We would like to query the database and somehow loop through Perforce Sync command steps, however we have not found a good way to do this without resorting to using vbscript and the Perforce COM object...

So, we've solved this for SYNC commands however in the near future I will have to come up with solutions that pull data from a database, build vb projects, copy, and zip files... etc... All of the things VBP is good at.

I hate to think of the amout of work to do all of this in script, it would nearly eliminate the usefulness of VBP. ( I might as well write it all in a program or script).

So, I guess what I really need is an example of querying a database into a recordset or something similar, and looping through VBP steps using the data from the query..

Any help in this area would be greatly appreciated... VBP has been a tremendous help in our automation needs,.

Thanks all!
Reply With Quote
  #2  
Old 06-09-2005, 10:16 PM
kevina kevina is online now
Registered User
 
Join Date: 03-27-2003
Posts: 825
Attached is a quick sample using subroutines, a Run Sql step and vbscript that loads data queried from Sql Server into a delimited macro. It also demonstrates how you can then use regular Visual Build Professional steps to do the actual work using this dynamic data.

While the design is fairly modular and generic you will probably need to modify it some for your particular situation/needs.
Attached Files
File Type: bld datadriven.bld (5.7 KB, 1568 views)
Reply With Quote
  #3  
Old 06-13-2005, 03:51 PM
posix337 posix337 is online now
Registered User
 
Join Date: 06-09-2005
Posts: 3
Lightbulb

Thanks for the sample script, I knew there had to be a way to do this!

I will attempt to make this work for our solution, it certainly looks promising.

Will post back here to let you know how it goes.
Reply With Quote
  #4  
Old 06-14-2005, 11:27 AM
posix337 posix337 is online now
Registered User
 
Join Date: 06-09-2005
Posts: 3
Questions

Ok, I have this script working, however I have come up with a couple of questions.

What is the size limit of the Macro LASTSTEP_OUTPUT? I see that it is holding the result of the query.

A corresponding question would be, what is the size limit of the DB_VALUES macro (or I guess any Macro)

Most likely, the generic form of this question should be:
What is the size limit of a macro...
Reply With Quote
  #5  
Old 06-14-2005, 12:51 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
The limit is the maximum length of the BSTR data type (~4 billion chars). In practice, this may be limited by the available memory on your system.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 09:02 AM.


Copyright © 1999-2023 Kinook Software, Inc.