I'm using Sql Compact3.5 as my DB with C# .NET what is the maximum size of sdf that I can give? Is there any way to programatically increase the maximum size of the sdf file? If so how?
Expand Databases, right-click the database to increase, and then click Properties. In Database Properties, select the Files page. To increase the size of an existing file, increase the value in the Initial Size (MB) column for the file. You must increase the size of the database by at least 1 megabyte.
SQL Server Compact 3.5 SP2 is an embedded database that allows developers to build robust applications for Windows desktops and mobile devices. The download contains the files for installing SQL Server Compact 3.5 SP2 and Synchronization Services for ADO.NET version 1.0 SP1 on Windows desktop.
Go to your database properties and change the files setting growth with Autogrowth in percentage or FixedSize(in MB). As well dont forget to select unrestricted file growth.
A file with . sdf extension contains the Microsoft SQL Server Compact (SQL CE) database which is also known as a compact relational database; produced by Microsoft for the applications made for mobile devices and desktops.
The maximum size of the database is by default 128 MB. Override this by using the following connection string.
Data Source=MyData.sdf;Max Database Size=256;Persist Security Info=False;
(from: http://www.connectionstrings.com/sql-server-2005-ce) and (from: http://msdn.microsoft.com/...)
The absolute maximum size of the database is 4gb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With