News:

Buying something from Amazon? Please consider using my affiliate links - Amazon.com or Amazon.co.uk - You get your stuff, Plan-G gets a little boost :)   

Main Menu

Potential fix for the 'Max Database Size' error

Started by Highflyer525, October 12, 2019, 12:17:11 PM

Previous topic - Next topic

Highflyer525

Hi Tim,

Hope you're well.

Just started to use your excellent application when I hit the 'The database file is larger than the configured maximum database size. This setting takes effect on the first concurrent database connection only. [ Required Max Database Size (in MB; 0 if unknown) = 257 ]' error.

I've looked around on your forum and I can see it's been lurking for a few years and you've not been able to reproduce it at your end so a bit of a nightmare to fix.

I've had a sniff around to see if I could help with what's going on from another developers perspective, to be your hands an eyes as this happens to both of my computers, the common denominator being the size of my X-Plane install.

After having a little play I'm pretty sure that;


  • It's a .NET EF app
  • It's using SQL CE (Compact Edition) as the back end
  • It's not using the Connection Strings in the App.config, maybe these are historic, so assuming it's using hard coded connection string in the app.

Having worked with it as well in the past I know 3.5 has a default limit of 256MB if the connection string doesn't stipulate a size. When I parse the X-Plane data, I watch the SDF file grow and sure enough it stops dead on 256MB half way through Airways in my particular instance. It also states the disk space as a secondary issue, but I think this is a red herring, it's referring to the disk space within the DB and not on the drive it resides.

Because it's not using the Connection Strings in the app.config (I think) it's ignoring your <parameter value="Max Database Size=4000"/> statement which is exactly what's needed to override the limit.

Would you mind if I suggest something? Would you be able to add the Max Database Size=4000 statement to the end of the Connection Strings within your code so it reads:

metadata=res://*/Data.FSData.csdl|res://*/Data.FSData.ssdl|res://*/Data.FSData.msl;provider=System.Data.SqlServerCe.3.5;provider connection string='Data Source=|DataDirectory|\Data\PlanG3_XPX.sdf';Max Database Size=4000

Hope you don't mind me chipping in like this, I'd just like to get it working but I'm obviously limited to what I can do. I'm pretty sure this will fix it.

If you want to PM me a private link with a temporary Beta version that I can test for you, that's no problem at all. Glad to help.

Cheers,

Mark.

tim arnot


Tim. @TimArnot

Highflyer525

Hi Tim,

Just in case it didn't reach you for whatever reason, I did reply. :)

Cheers,

Mark.