gpt4 book ai didi

sql-server - 类型提供程序无法连接到 localDB

转载 作者:行者123 更新时间:2023-12-03 01:55:33 25 4
gpt4 key购买 nike

我有以下 F# 脚本。我从正在运行的 Asp.net Mvc 项目复制了连接字符串。但是,它出现以下错误。连接字符串应该正确,因为 Asp.Net Mvc 项目工作正常。或者 F# 类型提供程序不接受连接字符串?

#r "System.Data.Entity.dll"
#r "FSharp.Data.TypeProviders.dll"
#r "System.Data.Linq.dll"

open System.Data.Linq
open System.Data.Entity
open Microsoft.FSharp.Data.TypeProviders

type private EntityConnection = SqlEntityConnection<ConnectionString=
"Data Source=(LocalDb)\v11.0;Initial Catalog=MyDB;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\MyDb.mdf",
Pluralize = true>

Script1.fsx(9,33): error FS3033: The type provider 'Microsoft.FSharp.Data.TypeProviders.DesignTime.DataProviders' reported an error: Error reading schema. error 7001: The provider did not return a ProviderManifestToken string. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) The network path was not found

最佳答案

您可能需要检查 v11.0 中的 v,已知它会导致一些问题。即使您的连接未设置为区分大小写,也请尝试将其大写并查看是否有效:V11.0

关于sql-server - 类型提供程序无法连接到 localDB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17500978/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com