Exception: "Input string was not in a correct format."
rdugre
Posts: 13
I am receiving the following exception (w/ stack trace below):
"Input string was not in a correct format."
This happens when I run the package executable and after I click the [Run] button once I've selected a database to upgrade. Any idea what could be causing that?
-- Rob --
"Input string was not in a correct format."
Server stack trace: at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider) at System.Int32.Parse(String s) at System.Convert.ToInt32(String value) at Package.SQLPackage_TC500_Upgrade_453.SQLBatches..ctor() in C:\\Projects\\Testcraft Projects\\Database Package\\Projects\\SQLPackage_TC500_Upgrade_453\\SQLPackage_TC500_Upgrade_453\\PackageResourceManager.cs:line 122 at Package.SQLPackage_TC500_Upgrade_453.PackageResourceManager.GetSQLBatches() in C:\\Projects\\Testcraft Projects\\Database Package\\Projects\\SQLPackage_TC500_Upgrade_453\\SQLPackage_TC500_Upgrade_453\\PackageResourceManager.cs:line 76 at Package.SQLPackage_TC500_Upgrade_453.PackageExecutor.Execute() in C:\\Projects\\Testcraft Projects\\Database Package\\Projects\\SQLPackage_TC500_Upgrade_453\\SQLPackage_TC500_Upgrade_453\\PackageExecutor.cs:line 327 at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(MethodBase mb, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink) Exception rethrown at [0]: at Package.SQLPackage_TC500_Upgrade_453.ProgressDialog.Run(IProgressExecutor executor) in c:\\projects\\testcraft projects\\database package\\projects\\sqlpackage_tc500_upgrade_453\\sqlpackage_tc500_upgrade_453\\progressdialog.cs:line 550 at Package.SQLPackage_TC500_Upgrade_453.PackageMain.Main(String[] args) in c:\\projects\\testcraft projects\\database package\\projects\\sqlpackage_tc500_upgrade_453\\sqlpackage_tc500_upgrade_453\\packagemain.cs:line 116
This happens when I run the package executable and after I click the [Run] button once I've selected a database to upgrade. Any idea what could be causing that?
-- Rob --
Comments
Is there any chance you'd edited one of the resources in the c# project? There is probably something in the resources that contains the batch count. If that becomes something that can't be converted into a number, that may be the reason for the error message!
The code is looking for an entry in the resource file named "PACKAGE_BATCH_COUNT", but the actual name for that entry in the resource file is "BatchCount"... so I think that is the source of the problem.
Incidentally, I didn't run into this issue with a New Database Package, its only happening on an Update Database Package.
-- Rob --
-- Rob --
Can you please send us the c# project so we can try to figure out why it isn't working?
The email address is support@red-gate.com.
Thanks!
-- Rob --