Friday, March 30, 2012

Problems installing SQL Server 2005 Mobile on device

I have a Fujitsu-Siemens LOOX 520 running WM 5 version 5.1.70 on which I am trying to create a Server 2005 Mobile database.

I have installed the following files on the Pocket PC after a hard reset to make sure the unit was in its vanilla state:

NETCFv2.wm.armv4i.cab

sqlce30.dev.ENU.ppc.wce5.armv4i.CAB

sqlce30.ppc.wce5.armv4i.CAB

sqlce30.repl.ppc.wce5.armv4i.CAB

All the files appeared to succesfully install. Connecting to the device in VS2005 works with no problems. Creating a small test app in VB.NET and running it on the device works no problems, so the device is satisfactorily connected to VS2005.

My problem is this:

When I try to create an SQL Server 2005 Mobile database on the device using Add Connection under the Data Sources window in Visual Studio 2005 Professional (RTM version), I get the following error:

"Microsoft SQL Server 2005 Mobile Edition and/or .NET Compact Framework v2.0 is not properly installed on your mobile device or the device is not responding."

Trying the same thing in Microsoft SQL Server Management Studio gives the same error, but a little bit of extra information:

"Microsoft SQL Server 2005 Mobile Edition and/or .NET Compact Framework v2.0 is not properly installed on your mobile device or the device is not responding. (SQL Server Mobile Edition ADO.NET Data Provider)"

As far as I can see, everything IS installed OK, so why is VS2005 not working?

Thanks for any help.

JB

A few others have reported this as well - creating the SQL Mobile database on device, directly from VS2005 seems a little flaky right now. My advice would be to create the SQL Mobile database on your development (desktop) machine and then add it to your smart device project as "Content" for deployment along with your CF app. You *can* create the database directly on device from SQL Server 2005 Management Studio if you have SQL Server 2005 installed - this does work well.

- Darren Shaffer

|||

Darren
Thanks very much indeed for your reply.
I discovered that installing a different set of files on the device actually solved the problem - specifically I installed the CE equivalents of the files that I listed previously. This seemed to sort the problem out - certainly installing those versions allowed the creation of an SQL mobile database on the device and locally on the desktop machine without any problems.
Incidentally, being something of a newbie to all this, I share the frustrations of Dave_AC with regards to the loss of simplicity of creating a database on the Desktop and being able to easily transfer it to the device without having to use SQL Server 2005 etc etc which I am completely new to. ADO.NET and Active Sync seemed to be a nice straightforward, relatively simple way of managing a single user database from desktop to device. Things seems a LOT more complicated now! I appreciate there is a tremendous amount of functionality and power that was not there before, but losing that simplicity seems to be a somewhat retrograde step in some ways.

(http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=163919&SiteID=1)
In that post, I see that you mentioned a webcast which you presented - -"I'm not entirely clear on why you need this - I build a *LOT* of CF apps for clients that include SQL CE and SQL Mobile and have never had a need to work with the .sdf file from a desktop app. If you are trying to find an effective way to load the initial database with data, my recent webcast shows how to do that using nothing but SQL Server 2005 Management Studio."
Where can we access that webcast? And are there other webcasts available that will help new users to get their heads round all this?

Thanks again for your help.

JB

|||

Darren

I stress that I truly am a Newbie in the midst of some serious Code Gods, so if I sound like I don't have a clue what I'm talking about - it's because I don't!

Cheers!

JB

|||

Here is the link to the on-demand webcast:

http://www.msreadiness.com/ws_abstract.asp?eid=15003229

I guess I still struggle to understand the need to create a SQL Mobile database from desktop .NET code when it can be created:

1. using query analyzer on device

2. on the desktop from VS2005

3. on the desktop from SS2005

4. in code on device

5. as a byproduct of a merge replication with AddOption.CreateDatabase enabled

Maybe I've been doing this for so long that I'm not seeing what it looks like to someone coming into it fresh. In any case, all of the CF MVPs are encouraging Microsoft to expand the reach of SQL Mobile. It would make a fabulous ClickOnce database option for Smart Clients.

-Darren

|||

Thanks for the link, Darren.

I'm not actually suggesting that I want to create an SQL mobile database from desktop .NET code - I understand how to create mobile databases via VS2005 or SS2005 which either reside on the desktop or on the device. That works, and works very well.

The difficulty for me comes in creating a simple single user database on the desktop which can be accessed by desktop code - for example an Access database like I used when programming with VS2003 VB.NET - and then having a simple way of synchronising the database on the mobile device with that database, purely for single user capability. In fact, for simple applications, you don't even want to be able to sync the database - you just want to be able to easily move the database back and forward from the desktop to the device, and be able to access that database from both locations ie. do some work on database on PC, then copy over to device and use there with no requirement to take data back from the device to the PC - really really simple. I write apps in which I actually don't WANT the user to be able to modify the desktop database from the device database. All the editing is done on the PC version, and then just copied to the devices for use in the field. Its a simple one-way process.

Previously I would have used RAPI and Active sync to move the database to the device with conversion being done automatically.

So in the past, you could make an Access database, then copy it over to the PPC and use the IntheHand wrapper to access the converted file on the pocket PC - and I'm sure you are aware of all this! All nice and straightforward - but with the new WM5 stuff and with SQL Server 2005 mobile, and SQL Server 2005, it seems that you can't do that as easily. You have to use replication, configure IIS for publication of data, and get into a whole load of stuff to do something which in the past was reasonably simple. Or do you? That's what I am trying to discover...

It may be that I am completely missing the point.. Remember, I've only had the VS2005 stuff for about a week now, and Christmas has inconveniently imposed itself on my programming time - and there's a lot to learn!

I'm not knocking all the SQL Mobile stuff - it looks superb once you have got your head round it - but for a newbie, it is pretty imposing! I guess I am just supremely thick.

Are there any tutorials or walkthroughs which explain this stuff at my dullard level?

Thanks again for your input.

JB

No comments:

Post a Comment