If you need to make a series of permenant changes to the VB6 source that you get from a client, for example to make it ready for running and testing in a specific environment, you can use the gmPF fix command. Not to be confused with compile/fix, the gmBasic fix command is a top-level command that does a search and replace on a specific named file.'
...
For example: The following script will do a search and replace and write the modified file to disk:
Code Block |
---|
<gmBasic> |
...
<Storage Action="Create" Identifier="VB6Edit" /> |
...
<Select Progress="1"/> |
...
...
<Fix name="Pre-Edit" fileFilter="C:\gmClients\Mertrix\src\Mertrix\Claims_Administration\SourceCode\frmDBselect.frm"> |
...
<Replace name="frmDBselect.frm"> |
...
<OldBlock><![CDATA[ |
...
mainModule.strprimaryConnection = "Provider=SQLOLEDB;Integrated Security=SSPI;" & |
...
_ "Initial Catalog=" & cboDB.Text & ";Data Source=" & cboServer.Text & ";Network Library=dbnmpntw" |
...
]]></OldBlock> |
...
<NewBlock><![CDATA[ |
...
cboServer.Text = "GMI-CS-02.gmi.local" 'GM fix: modify ConnectionString for GM |
...
Lab mainModule.strprimaryConnection = "Provider=SQLOLEDB;Integrated Security=SSPI;" & |
...
_ "Initial Catalog=" & cboDB.Text & ";Data Source=" & cboServer.Text & ";" 'Network Library=dbnmpntw" |
...
]]></NewBlock> |
...
</Replace> |
...
</Fix> |
...
<Storage Action="Close" /> |
...
</gmBasic> |
...