DataContext.CreateDatabase and DeleteDatabase methods

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
andrewAtCognito
Posts: 9
Joined: Fri 01 Aug 2008 10:27
Location: Crediton

DataContext.CreateDatabase and DeleteDatabase methods

Post by andrewAtCognito » 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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 01 Sep 2008 09:12

Devart has ipmlemented LINQ to SQL support for MySQL and Oracle. There is no support for PostgreSQL now (no DataContext class for PostgreSQL). We are working to provide this functionality in the future.
Could you explain what are you actually using?

andrewAtCognito
Posts: 9
Joined: Fri 01 Aug 2008 10:27
Location: Crediton

Post by andrewAtCognito » Mon 01 Sep 2008 09:48

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.

Post Reply