Error while Enable Code First Migrations - entity-framework

I tried this tutorial
http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application
And when I tried following step
enable-migrations -contexttypename SchoolContext
It results as follows
"An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct"
Any help would be greatly appreciated.

Related

WSO2 API-Manager with Postgres database is not working properly

I have shifted the default h2 database to Postgresql for WSO2 API Manager by following this documentation: https://apim.docs.wso2.com/en/latest/install-and-setup/setup/setting-up-databases/changing-default-databases/changing-to-postgresql/
Creating a new API on throws:
"Something went wrong while getting the Revisions!"
On server found this error
ERROR - ApiMgtDAO Failed to get API Revision deployment mapping details for api uuid: a96f7266-c340-49b6-bbe1-cb252b49860e
org.postgresql.util.PSQLException: ERROR: UNION types integer and boolean cannot be matched
Any help would be greatly appreciated... Thanks...

ODatabaseException OrientDB Record Error

I'm struggling to fix my orientdb database. I'm getting the error:
Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error on retrieving record #58:65894 (cluster: cluster_name_here)
I'm running REPAIR DATABASE --fix-graph and that's when i get this error. Is there any other suggestions in approaching this? This is also the case when running CHECK DATABASE
I tried using this link as a resource: https://orientdb.com/docs/last/Console-Command-Repair-Database.html

SailsJS MongoDB Database connection error

I am new for SailsJS. I am trying to create database connection with mongo but it shows error like this
A hook (`orm`) failed to load!
error: Error: Consistency violation: A model (`sleep`) references a datastore which cannot be found (`mongo`).
If this model definition has an explicit `connection` property, check that it is spelled correctly.
If not, check your default `connection` (usually located in `config/models.js`).
Finally, check that this connection (`mongo`) is valid as per http://sailsjs.org/documentation/reference/configuration/sails-config-connections.
Your model is connecting to an invalid connection 'mongo'.
Check the connection either in you model 'Sleep' or in config/models.js

Npgsql throws an error: wrong connection string. Can't connect to postgreSQL [F#]

I'm using SQLProvider to connect to my (local) PostgreSQL database in F#.
I've started with this code from fsprojects:
open FSharp.Data.Sql
open Npgsql
let [<Literal>] ResolutionPath =
__SOURCE_DIRECTORY__ + #"/../../packages/Npgsql/lib/net451/"
[<Literal>]
let connectionString = "Host=localhost;Port=5432;User ID=test;Password=test;Database=testdb;"
type PostgreSQL =
SqlDataProvider<
Common.DatabaseProviderTypes.POSTGRESQL,
ConnectionString = connectionString,
ResolutionPath = ResolutionPath,
IndividualsAmount = 1000,
UseOptionTypes = true>
When I'm trying to compile it I get this error message:
(path)/Database.fs(60,9): error FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Could not create the connection, most likely this means that the connectionString is wrong. See error from Npgsql to troubleshoot: The type initializer for 'Npgsql.Counters' threw an exception.
(path)/Database.fs(60,9): error FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Could not create the connection, most likely this means that the connectionString is wrong. See error from Npgsql to troubleshoot: The type initializer for 'Npgsql.Counters' threw an exception.
I've checked that user id and password and everything in connection string is correct.
I actually don't have any idea how to debug this issue.
Do you know what could be wrong?
Does it work for you without any issues?
I'm using macOS 10.12.
And lastly, in case I won't be able to fix this, are there any other methods that you would recommend for connecting to postgreSQL (with type providers)?
The error message clearly says that an exception was thrown from the type initializer for Npgsql.Counters - this is Npgsql 3.2's new support for Windows performance counters.
Unfortunately it seems that there are several issues with performance counters in various scenario (see #1447 and #1435). Because of this, version 3.2.2 (to be released this week) won't make use of them by default.
Can you please confirm that you're using 3.2.1 (and not 3.2.0), because a partial fix was introduced? If you're using 3.2.1 and getting this exception, you'll have to wait a few days for 3.2.0, and can use 3.1.10 in the meantime where the exception won't be thrown.

While connecting with ORM in Codeigniter getting a invalid Database error

[https://github.com/maltyxx/origami][1]
I am getting invalid database error while trying to use the ORM Composer from github .
The error is like :
You have specified an invalid database connection group (test) in your config/database.php file.
But in config/database.php i have given it clearly. Please help me on that.