Wednesday, March 28, 2012

New to CE and need some advice.

Hello,

I am new to the CE OS, SQL CE and mobile computing in general. I have been developing database applications using MS products ever since Windows 3.11 and Visual Basic 1.0. I have used MS Access and SQL Server since they were first released. But, I have never worked with Windows CE or any of the mobile OSs or with SQL CE or SQL Mobile.

We now have a project that requires us to develop a database application on handheld devices using the CE 4.2 and CE 5.0 OSs.We will be using CF 2.0, VS 2005 and SQL 2005 for our development environment.

My questions are:

1. Which version of mobile SQL will allow us to best develop for both the CE 4.2 and 5.0 OSs usinf VS 2005? I have done a lot of reading online and it's pretty confusing. There are quite a number of different versions out there. It seems some work with 4.2 and some with 5.0. Is there a version that will work for both?

2. Is SQL CE 3.0 (Sql 2005 Mobile) available for other than Laptop and Tablet use? When i finaly got to the download page for this version there was verbiage there that suggested it was not available for smart devices.

3. What is a good source of info to resolve these questions? I am using the MSDN areas for CE and SQL Mobile but haven't really found what I need to get started. Any suggestions on forums, books, articles, blogs, etc... would be greatly appreciated.

I know these are very broad questions but I want to get some advice from the experienced before going to far here.

1: SQL Compact Edition (3.1 aka 3.0.5300) does have support for CE 4.2 via this hotfix: http://support.microsoft.com/kb/934386/en-us

Support for CE 5.0 is built in the SDK:

http://www.microsoft.com/downloads/details.aspx?familyid=E9AA3F8D-363D-49F3-AE89-64E1D149E09B&displaylang=en

2: SQL CE 3.0 (SQL Server 2005 Mobile) is only licensed for Windows CE based devices and Tablet PC use.

SQL Compact Edition (3.1) is licensed for use on Windows CE and Win32 platforms.

3: The overview posts at the top of this forum is probably a good starting point.

|||

Thanks for the reply and the info Erik. That's what I neede to know.

I am now going though the "Creating a Mobile Application with SQL Server Mobile " SQL Server Mobile tutorial. I had a problem with the snapshot_agent user not being able to log in in order to run the SQL Server Snapshot Agent. But I found that if I add this user to the SQL Agent users group it works fine.

I have the replication setup and working and I am to the point now where I am creating the application in VS 2005. When I try to add a data connection I don't see "Microsoft SQL Server Mobile Edition" as one of the choices for Data Source. I have a reference to System.Data.SqlServerCe and I have put the "Using System.Data.SqlServerCe" directive in place. Any idea why this dtata source type wouldn't be available?

Thanks.

|||

You need to have the "Smart Device Programmability" VS setup option enabled. It is also a good idea to install VS 2005 SP1 and then add these "SQL Compact" tools for VS 2005 sp1:

http://www.microsoft.com/downloads/details.aspx?familyid=877C0ADC-0347-4A47-B842-58FB71D159AC&displaylang=en

|||

Erik,

Thanks for all the help. I really need to get this working.

Ok, I' m not sure where to set the "Smart Device programmability" option. I went to Add/Remove software in control panel and ran the VS 2005 Change/Remove option. I ran the Add/Remove components and repair/reinstall options and don't see the Smart Device progrmmability option.

I downloaded VS 2005 SP1 and installed it. that went ok.

I treid to install the SQL Compact tools for VS 2005 SP 1 ad it says that the patch can not be installed because the program to be upgraded is either missing or the wrong version.

Any other suggestions on this?

|||

Under the feature tree, expand Visual C# or Visual Basic, there you will see "Smart Device Programmability"|||

Ok, I have reinstalled VS 2005 with "Smart Device Programmability" in place. I installed VS 2005 SP1 and the SQL CE Tools for VS 2005. Everything installed correctly. I was able to create and test the connection to the replication database file with no problem. However, when I try to create a new data source from the connection I get the following error.

Error creating new data source:

Could not get type information for 'app.appdataset'

After several internet and MS Knowledgebase searches I have found very little concerning this error. Several people are however having the same problem and I've tried all the fixes I've found but no luck. These include:

1. Making sure no tables are named like C# reserved words. The table names are "MembershipData" and "FlightData".

2. making sure that their are no extraneous characters in the connection string.

3. I have seen two references to logging in as a different user on the computer and this fixing the problem. I have tried this but it didn't help. I would also like to understand why this would solve the problem, if it did, so users could be set up correctly in the first place.

I hate to feel like I have to be lead through this process step-by-step but I don't know what else to do.

Thanks again,

Rick

|||Please refer to this (recently published) checklist: http://blogs.msdn.com/stevelasker/archive/2007/08/07/configuring-visual-studio-2005-for-use-wtih-sql-server-2005-compact-edition.aspx

|||

Thanks Erik,

That's exactly what I needed. I have every thing running now except for merge replication through IIS. I'm sure that's an IIS configuration problem that I just have to work on.

Thanks again.

Rick

sql

No comments:

Post a Comment