Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7887083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:29:17+00:00 2026-06-03T05:29:17+00:00

I’m attempting to connect to a SQL Server Compact Edition database from F#, and

  • 0

I’m attempting to connect to a SQL Server Compact Edition database from F#, and attempting to use a type provider. This is in the Visual Studio 11 Beta, so I realize there might be an issue because of that, but I think it’s more likely that I just don’t have the know-how yet.

However, I have noticed that there’s no CE-specific type provider in Microsoft.FSharp.Data.TypeProviders and I’m unsure that a regular SqlDataConnection will do the trick, so that may be the issue right there.

However, when I try to create the connection, the IDE seems to recognize that I’m trying to hit a CE database, at least.

So, I have the following code:

type SqlConnection = 
  Microsoft.FSharp.Data.TypeProviders
    .SqlDataConnection<ConnectionString = @"Data Source=C:\\Path\\Database.sdf">
let db = SqlConnection.GetDataContext()

So it’s pretty standard, more or less straight out of the add new LINQ to SQL with type provider item menu.

The tooltip I get over the connection string is “Provider ‘System.Data.SqlServerCe.3.5’ not installed.” Looking that up seems to indicate that it’s a problem with not having Sql Server CE installed, but I’ve got the libraries, am able to connect to the database using a regular SqlCEConnection and running SqlCeCommands and such. And since it’s 4.0 and not 3.5, I’m not sure if it’s looking for the wrong provider. I created the database right in VS 11 beta, so I was figuring that all versions should match up and such.

So in short, I’m wondering if I’m doing something wrong, or if the VS11 beta type provider libraries don’t support CE 4.0 yet, or if there is something else I need to do to make it happen.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T05:29:18+00:00Added an answer on June 3, 2026 at 5:29 am

    This “Works on my Machine” (using VS 11 beta, Entity Framework, based on the walkthrough here, http://msdn.microsoft.com/en-us/library/hh361038(v=vs.110).aspx :

    open System.Data.Linq
    open System.Data.EntityClient
    open Microsoft.FSharp.Data.TypeProviders
    
    let connectionString = "metadata=res://*/;provider=System.Data.SqlServerCe.4.0;provider connection string='data source=C:\\Data\\SQLCE\\Test\\nw40.sdf';"
    
    type internal edmx = EdmxFile<"NWModel.edmx", ResolutionFolder = @"C:\Users\erik.COMMENTOR\Documents\Visual Studio 11\Projects\TestSqlCeFSharp">
    
    let internal context = new edmx.nw40Model.nw40Entities(connectionString)
    
    query { for supplier in context.Suppliers do
            select supplier }
    |> Seq.iter (fun supplier -> printfn "%s" supplier.Company_Name)
    

    Added references to:
    FSharp.Data.TypeProviders,
    System.Data.Entity,
    System.Data.Linq

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I want use html5's new tag to play a wav file (currently only supported
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.