Kinook Software Forum

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

Reply
 
Thread Tools Rating: Thread Rating: 11 votes, 5.00 average. Display Modes
  #1  
Old 09-30-2004, 09:27 AM
kevina kevina is online now
Registered User
 
Join Date: 03-26-2003
Posts: 825
Your particular situation is a bit difficult to deal with (and I apologize for not reading your previous posts more clearly).

Because the macro you are using (PROCFILES_FULLPATH) uses other macros, and contains the [ and ] symbols, you need to first expand the macro using Application.ExpandMacros() [in script so it doesn't interpret the [ ] symbols as framing additional script]. The xml below defines a modified version of the Replace in File step you provided, with a vbld_StepStarting script step that does this conversion (by placing the value into a temp macro for use by the step).

Note: simply copy the xml fragment below and paste into Visual Build Pro to review/use the step changes.

<step action='Replace in File' type='0'>
<FileIn>%_PROCFILES_FULLPATH%</FileIn>
<FileOut>%_PROCFILES_FULLPATH%</FileOut>
<Find>^ALTER\s+VIEW</Find>
<Replace>CREATE VIEW</Replace>
<description>Changes ALTER VIEW statements to CREATE VIEW statements</description>
<indent type='3'>2</indent>
<name>Make ALTER into CREATE</name>
<script><![CDATA[
Function vbld_StepStarting()
Application.Macros(vbldMacroTemporary).Add "_PROCFILES_FULLPATH", EscapeString(Application.ExpandMacros("%PROCFILES_ FULLPATH%"))
End Function
]]></script>
</step>
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 05:52 AM.


Copyright © 1999-2023 Kinook Software, Inc.