tag:blogger.com,1999:blog-5238131531249720750.post765466006916826870..comments2024-01-22T04:58:27.847+01:00Comments on Everything SQL Server Compact: Windows Phone Local Database tip: Initializing the databaseErikEJhttp://www.blogger.com/profile/12641272161018114573noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-5238131531249720750.post-46967534777404625662014-02-24T08:51:31.900+01:002014-02-24T08:51:31.900+01:00Bin: Suggest you ask in a forum, and start by shar...Bin: Suggest you ask in a forum, and start by sharing your connection stringErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-11039968128962678882014-02-24T07:57:16.731+01:002014-02-24T07:57:16.731+01:00Dear Mr. ErikEJ
I have a question about database o...Dear Mr. ErikEJ<br />I have a question about database of local in winphone 8.Everything i do as your tutorial is very good.and now i want to backup my data after I inserted new field or updated field,But i don't know good idea for its.So can you tell me Where is my file .sdf in my phone and how can i get it to update or backup database.Thanks so much.BinhDanHocVuhttps://www.blogger.com/profile/01676475677498874463noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-4191617878043219712013-03-29T09:17:30.487+01:002013-03-29T09:17:30.487+01:00Thank you very much sir for your great help now I ...Thank you very much sir for your great help now I know about.<br />Thank Mr. ErikEJKimleanghttps://www.blogger.com/profile/09824878036280976721noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-38980757931606247252013-03-29T08:24:43.157+01:002013-03-29T08:24:43.157+01:00Kimelang: You CANNOT include a password protected ...Kimelang: You CANNOT include a password protected file, as I have described here: http://erikej.blogspot.dk/2012/03/windows-phone-local-database-tip.html ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-73589910899576105322013-03-29T05:30:23.433+01:002013-03-29T05:30:23.433+01:00Thank Mr. ErikEJ for your comment
After few days a...Thank Mr. ErikEJ for your comment<br />After few days and I have re-install my operating system I found out the problem.<br />The problem is with my database have password protection.<br /><br />I can read content from database only if my database don't have password and build it as Content.<br />and this is my working connection string for database build as Content: @"Data Source = 'appdata:/DataRef/DictDataDB.sdf';File Mode = read only;";<br /><br />I can't use database with password as Content in read-only mode.<br />if I use database with password as Embedded Resource. I got the error message <b>"a specified communication resource (port) is already in use by another application"</b><br />if I use database without password as Embedded Resource. I got error The path is not valid. Check the directory for the database. [ Path = C:\Data\Users\DefApps\AppData\{D273290A-7FB8-4D5E-AB5E-A89B8AE9F39C}\Local\DataRef/DictDataDB.sdf ]<br />and this is my connection string for database build as Embedded Resource Database: @"Data Source = 'isostore:/DataRef/DictDataDB.sdf';";<br /><br />what should I do Sir if I want password for my data?Kimleanghttps://www.blogger.com/profile/09824878036280976721noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-61820743496609231952013-03-22T07:08:55.733+01:002013-03-22T07:08:55.733+01:00Kimelang: I have no idea, maybe test on another PC...Kimelang: I have no idea, maybe test on another PC?ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-8750738914884608522013-03-22T03:05:19.832+01:002013-03-22T03:05:19.832+01:00Thank you for your reply Mr. ErikEJ
I have try 3....Thank you for your reply Mr. ErikEJ<br /><br />I have try 3.5 but it the same error I can't deploy it.<br />The database is still empty just only one table structure.<br /><br />I'm not write any code yet I just create a default Windows Phone Databound App then add (.sdf) as Content and deploy it. It build success but deploy to emulator fail.<br /><br />Here is my error build log:<br />1>------ Build started: Project: EKDictionary, Configuration: Debug Any CPU ------<br />1> EKDictionary -> c:\users\icool\documents\visual studio 2012\Projects\EKDictionary\EKDictionary\Bin\Debug\EKDictionary.dll<br />1> Begin application manifest generation<br />1> No changes detected. Application manifest file is up to date<br />1> Begin Xap packaging<br />1> Creating file EKDictionary_Debug_AnyCPU.xap<br />1> Adding EKDictionary.dll<br />1> Adding Assets\AlignmentGrid.png<br />1> Adding Assets\Tiles\FlipCycleTileLarge.png<br />1> Adding Assets\Tiles\FlipCycleTileSmall.png<br />1> Adding Assets\Tiles\IconicTileMediumLarge.png<br />1> Adding Assets\Tiles\IconicTileSmall.png<br /><b>1> Adding DicData.sdf</b><br />1> Adding AppManifest.xaml<br />1> Adding Assets\ApplicationIcon.png<br />1> Adding Assets\Tiles\FlipCycleTileMedium.png<br />1> Adding WMAppManifest.xml<br /><b>1> Xap packaging completed successfully</b><br />2>------ Deploy started: Project: EKDictionary, Configuration: Debug Any CPU ------<br />2>Deploying c:\users\icool\documents\visual studio 2012\Projects\EKDictionary\EKDictionary\Bin\Debug\EKDictionary_Debug_AnyCPU.xap...<br />2>Connecting to Emulator WVGA 512MB...<br />2>Installing the application...<br />2>Deployment of application to device failed.<br />2>Unspecified error<br />========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========<br />========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========Kimleanghttps://www.blogger.com/profile/09824878036280976721noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-53146326914804658632013-03-21T14:13:13.055+01:002013-03-21T14:13:13.055+01:00Kimleang: The database must be 3.5 format, not 4.0...Kimleang: The database must be 3.5 format, not 4.0 and how big is it?ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-23804040448739914612013-03-21T11:47:58.050+01:002013-03-21T11:47:58.050+01:00Dear Mr. ErikEJ
I'm new to Windows Phone devel...Dear Mr. ErikEJ<br />I'm new to Windows Phone developer I want to develop a simple dictionary application, I have read your tutorial and I try your Option 3: Database file included, read only, and I got one problem.<br /><br />first I create a new default Windows Phone Project but I don't write any code yet, after that I add database (.sdf file) as Content then I build and deploy but I got an error: <b>"a specified communication resource (port) is already in use by another application"</b>, but when I remove (.sdf) from project it work fine. I can't find out what the problem is.<br /><br />the (.sdf) file is SQL Server Compact 4<br />and the project target to Windows Phone 8.0<br /><br />Thank you for your reply Mr. ErikEJ and sorry If I have some bad English.Kimleanghttps://www.blogger.com/profile/09824878036280976721noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-718090119747288792013-01-24T08:41:35.551+01:002013-01-24T08:41:35.551+01:00That is still the MS recommended approach, I am ju...That is still the MS recommended approach, I am just demonstrating some other (non-MS supported) approaches.ErikEJhttps://www.blogger.com/profile/12641272161018114573noreply@blogger.comtag:blogger.com,1999:blog-5238131531249720750.post-8969809876108388062013-01-24T02:15:55.946+01:002013-01-24T02:15:55.946+01:00Hi, did the procedure for "reference database...Hi, did the procedure for "reference database/read only" changed somehow?<br /><br />I've seen a lot blog posts saying you need an auxiliary app to create and populate the datase, and them you copy this database to your machine and then you add to your primary application. Is that a fact? Cause is doenst make sense.Unknownhttps://www.blogger.com/profile/04061266472244997400noreply@blogger.com