SQLProvider icon indicating copy to clipboard operation
SQLProvider copied to clipboard

Can't add connection string in fsx file

Open tforkmann opened this issue 6 years ago • 1 comments
trafficstars

Description

When adding a new connection to the typeprovider like this:

let [<Literal>] CompileTimeConnectionString = "Data Source=..."

type Sql = SqlDataProvider<Common.DatabaseProviderTypes.MSSQLSERVER, ConnectionString = CompileTimeConnectionString, UseOptionTypes=true>

I receiving following error message:

This expression was expected to have type 'System.String'
but here has type 'string'

I used the SqlProvider load script

Repro steps

Please provide the steps required to reproduce the problem

  1. Install latest SqlProvider nuget package with Paket 1.1.62

  2. Add a new fsx file and try to connect to a database

Expected behavior

A string should be accepeted.

Actual behavior

F# string type is not getting accepted.

Known workarounds

None I know off

Related information

  • SqlServer
  • Win10
  • Using netstandard2.0

tforkmann avatar Apr 29 '19 09:04 tforkmann

Seems like you mix mscorlib.dll (.net framework) and netstandard.dll somehow

Thorium avatar Apr 29 '19 09:04 Thorium