Adding a SQL Mobile Database to PPC project
I'm using VS2005 Beta 2 to develop a PPC application. When I try to add a new SQL Mobile Database to the project (by selecting Project | Add New Item | SQL Mobile Database), I receive the following error: "An error occurred while processing the local data file: Unexpected error". The database does appear in the project, but when I open it the local window shows what appears to be a memory dump. BTW, I have SQL Server 2005 April CTP and SQL Server Express Manager installed on the machine as well.
Any ideas on why I am getting this error? Also, is there any way to import an existing SQL Server Express database into a SQL Mobile database?
Thanks in advance,
-Amy
Hello Amy,
Thank you for your question - this is a known issue with the Visual Studio Beta 2. The first error (unexpected error) is because the DataSource Window was unable to be shown. The second error sounds like the incorrect editor was registered for the SDF filename.
Most importantly, is that the new SDF project item was added to your project; which appears to be the case.
Can you ensure that your SDF project item was also linked to in Server Explorer? If not, then to work around that, simply select "Add New Connection", select SQLMobile and then navigate to the SDF projectItem in your project.
Once you have a ServerExplorer connect for your SDF, you can use this toolwindow to add new tables, indexes and table data -- and hopefuly will be completely unblocked.
Let me know how it goes,
Carlton.
Thanks very much for the information. Before I read your reply, I got around the problem by uninstalling and reinstalling VS 2005 Beta 2, SQL Server 2005 April CTP, and SQL Server Express Manager. However on the reinstall, I installed the SQL Server components prior to installing VS 2005 Beta 2 (as opposed to the other way around, like I did the first time). Now I am able to add a SQL Mobile database without error. Just wondering if installation order has something to do with this issue or is this just a coincidence.
On a related note, is there a way in VS 2005 of importing a table from a SQL Server or Access database directly into my new SQL Mobile database? I couldn't find any obvious way of doing this.
Thanks again for your help,
-Amy
The April CTP and VS2005 do have issues with the installation order when it comes to SqlMobile. I believe the April CTP of Sql Server 2005 has older bits of SqlMobile than VS2005. Until both products have their final release, I would not recommend installing both on the same machine if you plan on doing SqlMobile development.
No, there's no way in VS2005 to do that style of import. There might be tools in SqlServer to allow that, although I haven't peeked to see.
Neil
Yup, that is spot on Neil - SQL Server performs much better database management than Visual Studio which tends to focus more on the application consumption of a database.
Be sure to let us know what you think of the SQLMobile features Amy!
Carlton