O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Connection Strings

When instantiating a DataContext, a connection string must be supplied, indicating the location of the database file and an optional password. See the following example:

string connectionString = "Data Source='isostore:/DirectoryName/FileName.sdf';Password='password'";DataContext dataContext = new DataContext(connectionString);

The Data Source parameter defines the location of the database file in isolated storage, and the Password parameter is used to access (or create) an encrypted database.

The isostore prefix of the Data Source value specifies that the file is located in isolated storage. By omitting the isostore prefix, it indicates that the file is located in the XAP file relative to its ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required