c# - How to use the class SqlCeConnection in the Window Phone 7 application? -


i developing window phone 7 application. new window phone 7 application development. want use sql server compact edition database in application database connectivity. in application have created database right clicking 'data connection' & choosing 'add connection' in server explorer. after have created database using create button in opened window.then have tested connection. successful. have added created database file in application right clicking on project name & choosing add existing item. database file added 'expensemanagerdb.sdf' have created tables database using server explorer. want programmatically database connectivity application. using following code

namespace expensemgrmobappl.category {     public partial class category : phoneapplicationpage     {         private void submitbutton_click(object sender, routedeventargs e)         {             string constr = "data source=" + (system.io.path.getdirectoryname(system.reflection.assembly.getexecutingassembly().getname().codebase)) + "\\expensemanagerdb.sdf;persist security info=false";             sqlceconnection connection = new sqlceconnection(constr);             sqlcecommand cmd = new sqlcecommand("select category_name form category category_id=1", connection);             connection.open();             textblock1.text = cmd.executescalar.tostring();             connection.close();         }     } } 

but not finding namespace/assembly sqlceconnection class. have tried add reference dll 'system.data.sqlserverce.dll' in application. reference not added. should need database connectivity ? need use sqlceconnection class in application ? looking thing can use sqlceconnection class in application ? can please provide me solution or link through can resolve above issue ? if doing wrong in above case please guide me.

sql ce not available in release of tools.

the alternatives storage behind web service, 3rd party db sources sterling or local storage in files using example xml , linq.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -