Jim Young

Unable to Initialize Database

Recommended Posts

Hi Maarten,

Downloaded your program.  Ran it a couple of times then saw there was an update so downloaded and installed v5.9.6444.37686.  Now it will not start up and gives me the error message Unable to Initialize Database Simlauncher will now close.  Any idea what went wrong?

The log states the following:

20170823175511    Loading database    
20170823175511    Database file C:\Users\JimY\Documents\SimLauncherX\SimLauncherX.P3Dv4.sqlite exists    
20170823175511    Initializing database    
20170823175513    Error initializing database    "Telerik.OpenAccess.OpenAccessException: System.InvalidOperationException: The migration of a primary key to a different type is not supported. PrimaryKey column [Id] of table [AircraftType] is modeled as integer. Database has int. ---> System.InvalidOperationException: The migration of a primary key to a different type is not supported. PrimaryKey column [Id] of table [AircraftType] is modeled as integer. Database has int.
   at OpenAccessRuntime.Relational.sql.SqlDriver.FixColumns(TableDiff tableDiff, DDLAction actions)
   at OpenAccessRuntime.Relational.sql.SqlDriver.ReportFixes(ICollection`1 schemasToCreate, List`1 diffList, DDLAction actions)
   at OpenAccessRuntime.Relational.sql.SqlDriver.checkDDL(ICollection`1[] tables, Connection con, ControlParams controlParams, DDLAction actions)
   at OpenAccessRuntime.DataObjects.tools.ant.SchemaMigrationTask.migrateDatabase()
   --- End of inner exception stack trace ---
   at Telerik.OpenAccess.SPI.Backends.ThrowException(Exception e)
   at OpenAccessRuntime.ExceptionWrapper.Throw()
   at OpenAccessRuntime.DataObjects.tools.ant.DataObjectsTaskBase.throwBuildException(String str, Exception e)
   at OpenAccessRuntime.DataObjects.tools.ant.SchemaMigrationTask.migrateDatabase()
   at OpenAccessRuntime.DataObjects.tools.ant.SchemaMigrationTask.execute()
   at OpenAccessRuntime.OpenAccessSchemaAdapter.CreateUpdateDDLScript(SchemaUpdateProperties schemaUpdateProps)
   at OpenAccessRuntime.SchemaHandlerImpl.Telerik.OpenAccess.ISchemaHandler.CreateUpdateDDLScript(SchemaUpdateProperties props)
   at MaartenBoelens.SimLauncherX.Model.SimLauncherXDatabase.<>c__DisplayClass98_0.<InitializeAsync>b__0()"

Best regards,

Jim

 

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Jim,

Sorry about that, your not the first one to suffer from this issue. To solve the issue, delete the C:\Users\JimY\Documents\SimLauncherX\SimLauncherX.P3Dv4.sqlite file and start again. Upon restart a new database will be created and everything will be ok after that. A new database had to be created anyway with the new version, but the application should not crash. I have disabled further downloads of the new version temporarily and will try to find a solution tomorrow (bedtime now in The Netherlands).

Edit: I was able to reproduce and fix issue. I will release a new version asap.

thanks, Maarten

Edited by mawibo
found the cause of the issue

Share this post


Link to post
Share on other sites

Thanks Maarten.  That fixed it and I was able to reinstall the new version with no errors.  Sent you a small donation earlier.  I really appreciate your contributions to the community.  This program is like a Swiss Army Knife!!

Best regards,

Jim

Share this post


Link to post
Share on other sites

Hi Jim,

Thank you very much for your donation and the compliments!

I couldn't resist fixing the issue before going to bed. Unfortunately for you, you will have to delete the database again before you install the latest version. There was no other way to fix it ;-(

thanks, Maarten

Share this post


Link to post
Share on other sites

Hi Maarten,

That was a superfast response and fix.  I appreciate your losing some sleep and the support!  I'm anxious to 'dive' into this program to see everything it does. :biggrin:

Best regards,

Jim

Share this post


Link to post
Share on other sites

Hi Jim,

I hope you like it! If you have any questions, don't hesitate to ask here on the forum or via e-mail. I still need to bring the user guide up to date, but a description of the more recent features (like RAAS, the fleet management, taxi route finder etc.) can also be found in the change log (button on the Home ribbon tab).

thanks, Maarten

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now