When we create a new .NET Core class it only contains the using System; reference. To enable Linq database queries in a .NET Core project, add using System.Linq; using System; using System.Linq; To enable the usage of .Include() in the Linq queries, add using Microsoft.EntityFrameworkCore;
Category Archives: Databases
Procedure or function ‘`…_Insert`’ cannot be found in database …
When you use the Microsoft .NET Entity framework to access a MySql database, the autogenerated code throws an error when you try to insert a row into the database with context.MY_TABLE.Add(MY_OBJECT); Server Error in ‘/’ Application. Procedure or function ‘`…_Insert`’ cannot be found in database ‘`…`’. Description: An unhandled exception occurred during the execution of …
Continue reading “Procedure or function ‘`…_Insert`’ cannot be found in database …”
No connection string named ‘…’ could be found in the application config file.
Two-tier applications separate the presentation layer and the data layer, and all database access related objects are located in the data-tier. When the application runs, the config file of the main project is read. In web applications, it is the web.config, in console applications the app.config file. When you get the following runtime exception Exception thrown: ‘System.InvalidOperationException’ in …
Continue reading “No connection string named ‘…’ could be found in the application config file.”
NotSupportedException: Unable to determine the provider name for provider factory of type ‘MySql.Data.MySqlClient.MySqlClientFactory’. Make sure that the ADO.NET provider is installed or registered in the application config
In a two-tier web application, the data layer is in a separate project. This allows better separation between the presentation layer and the data layer. This way you can reuse the data project in another application that targets the same database. To access a MySql database you need to add the MySql.Data and MySql.Data.Entity NuGet packages to …
Connect to a MySQL database from Visual Studio 2017
As of today weI can connect to a MySQL database, but cannot generate the Entity Data Model from a MySQL database in Visual Studio 2017 To access a MySQL database from Visual Studio 2017 IMPORTANT: First install MySQL for Visual Studio, and after that install MySQL Connector/Net. If MySQL Connector/Net is already installed on your workstation, uninstall …
Continue reading “Connect to a MySQL database from Visual Studio 2017”
The specified Security Group and Parameter Group are not set in the RDS instance
If the Terraform apply execution times out during the RDS instance creation, the specified Security Group and Parameter Group is not set in the RDS instance. The solution is to set the timeout in the aws_db_instance resource. When a multi-az RDS instance is launched from a snapshot, the process can take more than 55 minutes. The default …
Continue reading “The specified Security Group and Parameter Group are not set in the RDS instance”
java.sql.SQLException: Incorrect string value: ‘\xF0\x9F\x96\xA4\xE2\x9C…’ for column
When your application tries to store 4-byte Unicode characters in a MySQL database you may get the error rmessage java.sql.SQLException: Incorrect string value: ‘\x..\x..\x..\x..\x..\x…’ for column To store 4-byte Unicode characters in MySQL you need a modern version of the database engine, version 5.5 or later, set the column collation to COLLATE utf8mb4_unicode_ci in the database, …
MySQL Installation
To install the MySQL database server, download the installer from https://dev.mysql.com/downloads/ Download the MySQL Community Server from https://dev.mysql.com/downloads/ On the Generally Available (GA) Releases tab select the operating system and click the Go to Download Page button, Click the Download button next to the web or offline installer, If you don’t want to register at Oracle, click the No …
How to restore a Microsoft SQL database from backup with the Microsoft SQL Server Management Studio (MSSMS) user interface
There are multiple reasons to restore a database from backup. One of them can be disaster recovery, the other is to bring the production database to the developer machine. In both cases, the computer already has the old version of the database. In the new version of Microsoft SQL Server Management Studio (MSSMS) we cannot find …
Migrate databases to and from AWS RDS instances
Amazon Web Services do not provide tools to migrate data to, from and between AWS RDS instances. There is a free utility that can do the job. SQL Server Management Studio (SSMS) Install Microsoft SQL Server Management Studio (SSMS), because the utility uses libraries from it. Download the installer for free from https://msdn.microsoft.com/en-us/library/mt238290.aspx SQL Azure Migration …
Continue reading “Migrate databases to and from AWS RDS instances”