![]() Stack Trace: MySqlStream.ReadPacket() NativeDriver.GetResult(Int32& affectedRow, Int64& insertedId) Driver.GetResult(Int32 statementId, Int32& affectedRows, Int64& insertedId) Driver.NextResult(Int32 statementId, Boolean force) MySqlDataReader.NextResult() MySqlCommand.ExecuteReader(CommandBehavior behavior) MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) DbCommand.ExecuteReader() RelationalCommand.ExecuteReader(RelationalCommandParameterObject parameterObject) Enumerator.InitializeReader(Enumerator enumerator) c.b_19_0(DbContext _, Enumerator enumerator) MySQLExecutionStrategy.Execute(TState state, Func3 operation, Func3 verifySucceeded) Enumerator.MoveNext() List1.ctor(IEnumerable1 collection) Enumerable. Follow the steps to select a database and use the USE command before running any other statements. The error can occur in the command line, graphical user interface, or. Net 6 versions of MySql.EntityFrameworkCore, since it was working fine in the old versions, plus my entities have the schema defined, so I should not have to supply that in the connection string. Learn how to resolve the error no database selected in MySQL when you perform a statement without selecting a database first. Additionally, in both versions, I can use the underlying MySqlConnection to query the database, without specifying the database in the connection string. When I use MySql.EntityFrameworkCore 3.1.27, I can do all operations without any errors. Oddly, When I use SaveChanges to insert records into the database, I do not get any errors. Mysqldump -databases rdsdb -single-transaction -order-by-primary -hex-blob -no-data -routines -events -set-gtid-purged=OFF -u root -p -h 192.168.151.18 -P 3306 |sed -e 's/DEFINER*=**\*/\*/' -e 's/DEFINER*=.*FUNCTION/FUNCTION/' -e 's/DEFINER*=.*PROCEDURE/PROCEDURE/' -e 's/DEFINER*=.*TRIGGER/TRIGGER/' -e 's/DEFINER*=.*EVENT/EVENT/' > dump-defs.When I use MySql.EntityFrameworkCore 6.0.7, if I do not specify a database in my connection string, I get a "No database selected" exception when using the entities to select data with Linq statements. To select a database, we need to use the USE statement. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |