c++ - Using Max Database Size option in ADO causes the Open command to throw -


i have sqlcompact database i'm trying access using ado , c++. due size of database (300mb, on default 256mb limit), have specify max database size in connection string. doing causes .open(...) function throw.

the code i'm using:

hresult hr = conn.createinstance(__uuidof(connection), null); conn->open(l"provider=microsoft.sqlserver.ce.oledb.4.0;data source=test.sdf;max database size=512", l"", l"",adconnectunspecified);   

the error:

hr: db_e_errorsoccurred

description: "multiple-step ole db operation generated errors. check each ole db status value, if available. no work done."

message: "idispatch error #3105"

note:

i've tried using same code, smaller database , removing max database size connection string , works expected. adding max database size again causes problem reappear, therefore assumption it's 1 causing error.

any thoughts? how can work databases on provider default size?

you must use:

provider= microsoft.sqlserver.ce.oledb.4.0;data source=test.sdf;ssce:max database size=512 

(same applies password , other sql compact specific keywords)


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

Nuget pack csproj using nuspec -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -