Hi
I have both an ADO.NET Entity and DataContext class for use with my database schema. I would like to use the DataContext class for creating and deleting the database using their CreateDatabase and DeleteDatabase methods. I create a connection string which is passed over to the created PgSqlConnection connection. The PgSqlConnection is then passed into the constuctor of the DataContext. I can then call the DataContext.DatabaseExists() and this appears to work fine. However on calls to DeleteDatabase and CreateDatabase an exception is raised...
"Database 'MASTER does not exist". The database name in the connection string for example is Database=Test whereas the exception when raised returns "MASTER" (as above).
Any ideas?
Kind regards
Cognito Software Ltd
DataContext.CreateDatabase and DeleteDatabase methods
-
- Posts: 9
- Joined: Fri 01 Aug 2008 10:27
- Location: Crediton
-
- Posts: 9
- Joined: Fri 01 Aug 2008 10:27
- Location: Crediton
Morning
We are using VS2008 SP1, PostgreSQL 8.3.3, latest PostgreSQLDirect .NET,
ADO.NET Entity Framework. We have used the VS DataContext classes in the past for designing and maintaining databases on MS SQL. Having the graphical capability to design DB schemas and the create/delete databases functionality based upon the schema (CreateDatabase() & DeleteDatabase()) has been a very useful tool. Once the databases have been created, we use ADO.NET Entities for all table object processes.
We are using VS2008 SP1, PostgreSQL 8.3.3, latest PostgreSQLDirect .NET,
ADO.NET Entity Framework. We have used the VS DataContext classes in the past for designing and maintaining databases on MS SQL. Having the graphical capability to design DB schemas and the create/delete databases functionality based upon the schema (CreateDatabase() & DeleteDatabase()) has been a very useful tool. Once the databases have been created, we use ADO.NET Entities for all table object processes.