<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Mobile and Handheld Devices</title><link>http://forums.asp.net/48.aspx</link><description>Target mobile and handheld devices with ASP.NET - cell phones, blackberry, PDA, etc.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Problem with connection to SQLCE Database</title><link>http://forums.asp.net/thread/3271255.aspx</link><pubDate>Thu, 02 Jul 2009 12:26:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3271255</guid><dc:creator>lspence</dc:creator><author>lspence</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3271255.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=48&amp;PostID=3271255</wfw:commentRss><description>&lt;p&gt;Thanks, I already figured it out after doing some more research.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Problem with connection to SQLCE Database</title><link>http://forums.asp.net/thread/3270946.aspx</link><pubDate>Thu, 02 Jul 2009 10:06:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3270946</guid><dc:creator>Guang-Ming Bian - MSFT</dc:creator><author>Guang-Ming Bian - MSFT</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3270946.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=48&amp;PostID=3270946</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi lspence, &lt;/p&gt;
&lt;p&gt;There is no relative path concept in WinCE platform, so it is obviouse that your path is wrong,&amp;nbsp; we have to take absolute path, like the code below:&lt;/p&gt;
&lt;p&gt;ConnectionString = &amp;quot;Data Source = &lt;a&gt;\\Program&lt;/a&gt; Files\\DeviceApplication6\\data.sdf&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Guang-Ming Bian - MSFT&lt;/p&gt;</description></item><item><title>Problem with connection to SQLCE Database</title><link>http://forums.asp.net/thread/3259150.aspx</link><pubDate>Fri, 26 Jun 2009 04:05:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3259150</guid><dc:creator>lspence</dc:creator><author>lspence</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3259150.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=48&amp;PostID=3259150</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m having some trouble in understanding why I&amp;#39;m unable to connect to a simple test database I created through code. The database shows under Solution Explorer; however, it throws a SqlCeException with &amp;quot;The database file cannot be found as soon as it tries to open the connection. Check the path to the database. [Data Source = test.sdf]&amp;quot;. If I navigate to the projects location using Explorer I can clearly see the database file. Below is my code for testing this.&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;pre name="code" class="c-sharp"&gt;string connectionString = &amp;quot;Data Source=test.sdf;password=password;encrypt=true&amp;quot;;&lt;br /&gt;SqlCeEngine engine = new SqlCeEngine(connectionString);&lt;br /&gt;engine.CreateDatabase();&lt;br /&gt;&lt;br /&gt;SqlCeConnection conn = new SqlCeConnection(connectionString);&lt;br /&gt;SqlCeCommand cmd = new SqlCeCommand();&lt;br /&gt;            &lt;br /&gt;cmd.CommandText = &amp;quot;SELECT * FROM Project&amp;quot;;&lt;br /&gt;conn.Open();&lt;br /&gt;SqlCeResultSet resultSet = cmd.ExecuteResultSet(ResultSetOptions.Scrollable |&lt;br /&gt;                                             ResultSetOptions.Updatable);&lt;br /&gt;this.bindingSource1.DataSource = resultSet;&lt;br /&gt;&lt;/pre&gt;&lt;p&gt;&lt;br /&gt;Any ideas why it is unable to find the database when it is actually there within the project?&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>