Solve Native error 25009 [duplicate]

0

Well, I get that error when it comes to opening the database, I checked the path and the database path is the correct C / Folder Database disk and that's where my database is located. sdf,

how can I solve it thanks

    
asked by Cristian R.M 14.07.2016 в 16:25
source

1 answer

0

Give a @ before the quotes:

System.Data.SqlServerCe.SqlCeConnection con = new System.Data.SqlServerCe.SqlCeConnection(@"Data Source=C:\Base de datos\MisPedidos.sdf");

Update:

Since you are using a smart device I assume that with Windows CE , this operating system requires that every route starts with a backslash " \ "

We are updating the connection string:

System.Data.SqlServerCe.SqlCeConnection con = new System.Data.SqlServerCe.SqlCeConnection(@"Data Source=\Base de datos\MisPedidos.sdf");

Reference: link

    
answered by 14.07.2016 в 19:00