Can't Compile using SqlDataConnection in F# on Mono in Linux

I am using mono on Linux, making an F# code to access an SQL Server Database. I am using SqlDataConnection.

My code is the following:

  • Should the script component be called when 0 rows are sent to it in a data flow?
  • Deadlock because of update query
  • How to efficiently group by date with a timezone specified?
  • MSSQL Run stored procedure multiple times concurrently
  • SQL Server 2008 - Add XML Declaration to XML Output
  • Creating Default columns in SQL 2008 using Policy management (DMF)
  • namespace AggregatorService
    open FSharp.Data.TypeProviders
    open System.Data
    open System.Data.Linq
    module DataBaseProvider = 
        type databaseConn = SqlDataConnection<ConnectionString = "Data Source=;Initial Catalog=master;Persist Security Info=True;User ID=sa;Password=xxxxx">
        let getDataContext() =
            let dbConn = databaseConn.GetDataContext();

    I can’t compile this code. I am getting this annoying error:

    The type provider ‘FSharp.Data.TypeProvider.DesignTime.DataProviders’ reported an error reading schema. No access to the given key (FIS3033)

    My package.config file is:

    <?xml version="1.0" encoding="utf-8"?>
      <package id="Deedle" version="1.2.5" targetFramework="net40" />
      <package id="FSharp.Core" version="" targetFramework="net40" />
      <package id="FSharp.Data" version="2.3.2" targetFramework="net40" />
      <package id="FSharp.Data.SqlClient" version="1.8.2" targetFramework="net40" />
      <package id="FSharp.Data.TypeProviders" version="" targetFramework="net40" />
      <package id="NUnit" version="2.6.4" targetFramework="net40" />
      <package id="SQLProvider" version="1.0.22" targetFramework="net40" />

    A C# program is connecting from the same computer, so, I think the problem is not with mono configurations or to be in a Linux machine.

    Anyone has a solution or a Tip on how to solve that?

    One Solution collect form web for “Can't Compile using SqlDataConnection in F# on Mono in Linux”

    Unfortunatelly it looks mono is not able to deal this package as well I wish. Searching I found there is a bug from two years ago, but I don’t find any solution yet.

    What I am doing to leave that is using FSharp.Data.Sql instead, then, I use SqlDataProvider instead of SqlDataConnection, ow it looks:

    namespace AggregatorService

    open FSharp.Data.Sql
    open Deedle
    open System.Linq

    module DatabaseService =

    let connectionString = "Data Source=;Initial Catalog=nextel_ericsson_umts_brasil;Persist Security Info=True;User ID=sa;Password=****";
    type bd = SqlDataProvider<
                ConnectionString = connectionString,
                DatabaseVendor = Common.DatabaseProviderTypes.MSSQLSERVER >
    type Database() =
        static member contextDbo() =
        static member acAgregations() =
            Database.contextDbo().AcAgregations |> Frame.ofRecords
        static member acBusyHourDefinition() =
            |> Frame.ofRecords
            //|> Frame.getCols["time_agregation_type", "destination_table", "reference_table", "alternative_reference_table_scan", "formula"]
        static member acBusyHourDefinitionFilterByTimeAgregationTipe(value:int) = 
            |> Frame.indexRowsInt "tome_agregation_type"
            |> Frame.getRows
            |> Frame.filterRowValues( fun row -> row.GetAs<string list>)

    As I can see, that works the same way. I don’t know if there is some difference expected, but it’s dealing with my needs until now.

    MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.