Input string was not in correct format

58 views
Skip to first unread message

corso321

unread,
Dec 5, 2016, 10:41:06 PM12/5/16
to FluentMigrator Google Group
                            string connectionString2 = @"Server = localhost; Database = testDb; User Id = sa; Password = passwd2;";
                            var announcer = new TextWriterAnnouncer(s => Console.WriteLine(s));
                            var assembly = Assembly.GetAssembly(typeof(CathiDatabaseUpdater.Migrations.AddFirmwareColAddReleasePackageVersionColumnRenameVariantcs));

                            var migrationContext = new RunnerContext(announcer)
                            {
                                Namespace = "CathiDatabaseUpdater.Migrations"
                            };
                            IMigrationProcessorOptions options = new ProcessorOptions
                            {
                                PreviewOnly = false,
                                Timeout = 60
                            };
                            var factory = new SqlServer2014ProcessorFactory();
                            var processor = factory.Create(connectionString2, announcer, options);


                            var runner = new MigrationRunner(assembly, migrationContext, processor);
                            runner.MigrateUp();

Hi

Why does new MigrationRunner throws "Input string was not in correct format" ??

Does anyone got similar problem?

Dustin Venegas

unread,
Dec 5, 2016, 10:45:05 PM12/5/16
to FluentMigrator Google Group
@corso321,

Do you have a more specific exception that contains a stack trace and inner exceptions? It could be a few things. 

-dev


--
You received this message because you are subscribed to the Google Groups "FluentMigrator Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fluentmigrator-goog...@googlegroups.com.
To post to this group, send email to fluentmigrato...@googlegroups.com.
Visit this group at https://groups.google.com/group/fluentmigrator-google-group.
For more options, visit https://groups.google.com/d/optout.

Michael Powell

unread,
Dec 6, 2016, 9:36:23 AM12/6/16
to FluentMigrator Google Group


On Monday, December 5, 2016 at 10:41:06 PM UTC-5, corso321 wrote:
                            string connectionString2 = @"Server = localhost; Database = testDb; User Id = sa; Password = passwd2;";
                            var announcer = new TextWriterAnnouncer(s => Console.WriteLine(s));
                            var assembly = Assembly.GetAssembly(typeof(CathiDatabaseUpdater.Migrations.AddFirmwareColAddReleasePackageVersionColumnRenameVariantcs));

User Id? Not sure how connection strings treat spaces, per se.

Google, "your provider" connection string examples; there are TONS of examples for just about EVERY provider out there.
Reply all
Reply to author
Forward
0 new messages