我正在使用Linq2db for MySQL,尝试编辑时出现此错误 mydatabase.tt文件->
Severity Code Description Project File Line Suppression State
Error Running transformation: MySql.Data.MySqlClient.MySqlException (0x80004005): Unknown table 'parameters' in information_schema
at MySql.Data.MySqlClient.MySqlStream.ReadPacket()
at MySql.Data.MySqlClient.NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId)
at MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force)
at MySql.Data.MySqlClient.MySqlDataReader.NextResult()
at MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior)
at MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at LinqToDB.Data.DataConnection.ExecuteReader(CommandBehavior commandBehavior)
at LinqToDB.Data.CommandInfo.Query[T](Func`2 objectReader)
at LinqToDB.DataProvider.MySql.MySqlSchemaProvider.GetProcedureParameters(DataConnection dataConnection)
at LinqToDB.SchemaProvider.SchemaProviderBase.GetSchema(DataConnection dataConnection, GetSchemaOptions options)
at Microsoft.VisualStudio.TextTemplating1C8D25087E09D088F52217B8EAF40277DD5B77FA6EF545EC279B3B36B574D212884F1FD45CDD94CFD93CCE64E7E6818E71B0F2C9B1B2129AB70DD0D74B6074C9.GeneratedTextTransformation.LoadServerMetadata(DataConnection dataConnection) in C:\Users\dell\source\repos\linq2db\packages\linq2db.MySql.2.5.3\build\..\contentFiles\any\any\LinqToDB.Templates\DataModel.ttinclude:line 103
at Microsoft.VisualStudio.TextTemplating1C8D25087E09D088F52217B8EAF40277DD5B77FA6EF545EC279B3B36B574D212884F1FD45CDD94CFD93CCE64E7E6818E71B0F2C9B1B2129AB70DD0D74B6074C9.GeneratedTextTransformation.LoadMetadata(DataConnection dataConnection) in C:\Users\dell\source\repos\linq2db\packages\linq2db.MySql.2.5.3\build\..\contentFiles\any\any\LinqToDB.Templates\DataModel.ttinclude:line 414
at Microsoft.VisualStudio.TextTemplating1C8D25087E09D088F52217B8EAF40277DD5B77FA6EF545EC279B3B36B574D212884F1FD45CDD94CFD93CCE64E7E6818E71B0F2C9B1B2129AB70DD0D74B6074C9.GeneratedTextTransformation.LoadMySqlMetadata(String server, String database, String uid, String password, Int32 port) in C:\Users\dell\source\repos\linq2db\packages\linq2db.MySql.2.5.3\build\..\contentFiles\any\any\LinqToDB.Templates\LinqToDB.MySql.ttinclude:line 28
at Microsoft.VisualStudio.TextTemplating1C8D25087E09D088F52217B8EAF40277DD5B77FA6EF545EC279B3B36B574D212884F1FD45CDD94CFD93CCE64E7E6818E71B0F2C9B1B2129AB70DD0D74B6074C9.GeneratedTextTransformation.TransformText() in C:\Users\dell\source\repos\linq2db\linq2db\DataModels\smartstudentanalysis.tt:line 41 Miscellaneous Files C:\Users\dell\source\repos\linq2db\packages\linq2db.MySql.2.5.3\build\..\contentFiles\any\any\LinqToDB.Templates\DataModel.ttinclude 103
答案 0 :(得分:1)
您需要禁用tt文件中的过程模式加载:
GetSchemaOptions.GetProcedures = false;
您使用的INFORMATION_SCHEMA.PARAMETERS
表没有哪个MySQL版本?