DataContext.CreateDatabase and DeleteDatabase methods

DataContext.CreateDatabase and DeleteDatabase methods

Postby 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
andrewAtCognito
 
Posts: 9
Joined: Fri 01 Aug 2008 10:27
Location: Crediton

Postby 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?
Shalex
Devart Team
 
Posts: 7781
Joined: Thu 14 Aug 2008 12:44

Postby 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.
andrewAtCognito
 
Posts: 9
Joined: Fri 01 Aug 2008 10:27
Location: Crediton


Return to dotConnect for PostgreSQL