How to increase SQL CE db file?

  • I tried inserting about 500,000 records into the sql ce db and it failed when it ran out of space in the db. Error message said it hit the default max db file size which i think was around 128mb. Does anybody know how to increase the max db file size for sql ce? Do we have to do it from ADO.NET code, visual studio or management studio? I can't seem to find the answer. =(

  • The database size is set in the connection string:

    conn.ConnectionString = _

    "Persist Security Info = False; Data Source = 'SalesData.sdf';" & _

    "Password = ' '; File Mode = 'shared read'; " & _

    "Max Database Size = 256; Max Buffer Size = 1024"

    The default size is 128M.

    Dewey Harris

  • Thanks Dewey! I also, found out from management studio when you create a new sql ce db the "options" button on the lower right corner of the connection window will allow you to set the default DB size!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply