Read from text file size limit? Can't loop if?
Posted: Thu Dec 09, 2010 10:36 am
Hello all, I have a problem with InstallAware 9 for reading text files.
Based on a condition during install (If it is a new install or not) I need to run a series of scripts against SQL Server to create and populate a couple of databases. Since these scripts are prone to changing as new releases come out we wanted to make the processing dynamic so the install script doesn't need to be updated every time one of our SQL scripts changes.
I am using a File Bag to house the files and make them available at run time. This works very well and most of the scripts I can use Read from text file with the #READALL switch into a variable and then use the variable in the MS SQL Server action. I have a couple of larger script files, 400+kb some with upwards of 7 - 8 thousand lines and 450,000+ characters, that do not get read by the Read from text file. The variable it should have loaded into doesn't load the script and I can not display its contents. I don't have much control over the script files given to me so I need to work with what I have if at all possible.
I figure this is a limitation in that the files are just too large for the runtime variable size limit, which is odd because I can paste the full script into the MS SQL Server dialog at design time and compile and run it successfully, but this does not handle future changes. I tried just making a loop in my include script to read through each line until it finds a GO statement and then execute each section, but I found InstallAware does not support loops like Wise did, and when I tried the label route it gave an error that I can not nest labels inside loops/conditionals.
Am I missing something with processing text files or loops here? How can I dynamically parse this file at runtime?
Thank you for any help or suggestions you guys might have.
Based on a condition during install (If it is a new install or not) I need to run a series of scripts against SQL Server to create and populate a couple of databases. Since these scripts are prone to changing as new releases come out we wanted to make the processing dynamic so the install script doesn't need to be updated every time one of our SQL scripts changes.
I am using a File Bag to house the files and make them available at run time. This works very well and most of the scripts I can use Read from text file with the #READALL switch into a variable and then use the variable in the MS SQL Server action. I have a couple of larger script files, 400+kb some with upwards of 7 - 8 thousand lines and 450,000+ characters, that do not get read by the Read from text file. The variable it should have loaded into doesn't load the script and I can not display its contents. I don't have much control over the script files given to me so I need to work with what I have if at all possible.
I figure this is a limitation in that the files are just too large for the runtime variable size limit, which is odd because I can paste the full script into the MS SQL Server dialog at design time and compile and run it successfully, but this does not handle future changes. I tried just making a loop in my include script to read through each line until it finds a GO statement and then execute each section, but I found InstallAware does not support loops like Wise did, and when I tried the label route it gave an error that I can not nest labels inside loops/conditionals.
Am I missing something with processing text files or loops here? How can I dynamically parse this file at runtime?
Thank you for any help or suggestions you guys might have.