F# Type providers, 2 databases, one can access metadata one can't

163 Views Asked by At

F# .net core 2.1 Project, using type providers specifically

  • SQLProvider - 1.1.16
  • Fsharp.Core 4.5.2
  • Fsharp.Data 3.0.1
  • System.Data.SqlClient 4.6.0

Yes Linq is open too, or the first db would fail .

I have a few databases on one MS SQL server 2017 (140) I access one database just fine but not the other

when the connection string points to First database the intellisence works just fine and brings back a list of objects in the Dbo. Schema and allows me to get results of any query.

When switching to the other database the intellisence works for ctx.functions, ctx.procedures just fine, when trying ctx.Dbo. it displays (red circle) and won’t go any further?

Exit VS and same error, the error is pages long so too big to post here. What is going on, credentials are good and I have compared all of the database properties they look the same. And besides it’s getting some metadata from the other db. Any thoughts anyone? Thanks in advance

let [<Literal>] Conn_str = @"Data Source=MYCOdbServer;Initial Catalog=MyCompDB1;Integrated Security=SSPI; User ID=validid;Password=validpass; Connection Timeout=900"

type dbProv = SqlDataProvider<ConnectionString = Conn_str, DatabaseVendor = Common.DatabaseProviderTypes.MSSQLSERVER>

let ctx = dbProv.GetDataContext()

let test_func_connect =

        query { for x in ctx.Dbo.DimDate do

                        select x }

-- use sql profiller as suggested - sql submitted looks the same

-- added below part of vs error message referring to:

get_AccountBalances func? dataContext+dboSchema' member 'GetProperties': The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: GetMethodImpl. not support overloads, name = 'get_AccountBalances', methods - '[|Method get_AccountBalances; Method get_AccountBalances|]', callstack = '" at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo) at System.Environment.get_StackTrace() at ProviderImplementation.ProvidedTypes.ProvidedTypeDefinition.GetMethodImpl(String name, BindingFlags bindingFlags, Binder _binderBinder, CallingConventions _callConvention, Type[] _types, ParameterModifier[] _modifiers) at System.Type.GetMethod(String name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) at ProviderImplementation.ProvidedTypes.ProvidedTypesContext.convMethodRefToTgt(MethodInfo m) at ProviderImplementation

0

There are 0 best solutions below

Related Questions in F#