Sunday, January 20, 2008

Subsonic project nightmare with SQL Mobile

For those of you who've been struggling to get this great piece of technology working with mobile/lightweight databases also know that it can be quite a struggle. Now don't get me wrong... this is a great product for generating DAL ( Data Access Layers) for normal db's with sql providers, oracle providers, and even mysql providers. So after I watched the SonicCasts and downloaded the 2.02 product from codeplex I immediately got to work with trying to get this thing working with sql mobile... I followed the directions exactly and still no luck, so I hit the forums and checked the latest FAQ up on the site... but there was only a blurb about how some guy got the product to work with SqlLite, so one of the contributors responded to the post by thanking the guy for making his work with sql mobile easier for the next release. I thought to myself how can I get that guys code today to make my solution work? Then I went to check out the latest subsonic project bits from subversion. This turned out to be a good thing... sqlce provider was there in the latest bits... so I re-compiled the code and ran all the tests. After all that was complete I then proceeded to generate the code, and I got an error message saying that it could not generate do to the sql mobile database not being created with .NET 3.5.

I'm going to switch back to my typed datasets and simple sql queries in my original data access layer until they release another version with explicit instructions on how to implement sql mobile. The code is there so it's just a matter of time before they have a sonic cast on the subject.


  1. >>>I then proceeded to generate the code, and I got an error message saying that it could not generate do to the sql mobile database not being created with .NET 3.5<<<

    Hi Frederick - some detail would help - what's your environment etc? I don't recognize this error...

  2. Rob,
    I'm not sure how you found me... however, I'm happy you did.

    I'm running Windows XP SP2 and using VS2008 TeamSuite editions.
    I downloaded the product and ran through what was a very painless yet pleasant install then tried the product out on a SQL Server 2005 database. I was able to generate a DAL in a class library as advertised.

    I currently have a product that I'm trying to get out to the market that runs SQL Mobile in proc with my application. I noticed that there wasn't any support in that version of the product, but being the curious guy that I am I tried anyway... as soon as I did that the generating process stopped and said that the "that there is a problem with the provider. after reading through the forums I noticed some work was contributed that was geared around SQLCE so I downloaded the latest snapshot from subversion and compiled and ran.

    To my surprise there was a new provider in the dataproviders folder for SQLCE. However, when I tried to generate it using the DAL menu options off the tools menu in VS2008 I got an error saying that it needs a sql mobile 3.5 database in order to complete the process. Then it says "upgrade the current db using the upgrade() method. This was in the output windows in visual studio. When I create a new mobile db using vs2008 and the .NET 3.5 SqlCE libraries, I tried it again and it gave me the same message as before. If you'd like I can post screen shots to help you get a better idea?