DataContext.CreateDatabase and DeleteDatabase methods
Posted: Thu 28 Aug 2008 15:38
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
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