Page 1 of 1

DataContext.CreateDatabase and DeleteDatabase methods

Posted: Thu 28 Aug 2008 15:38
by andrewAtCognito
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

Posted: Mon 01 Sep 2008 09:12
by Shalex
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?

Posted: Mon 01 Sep 2008 09:48
by andrewAtCognito
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.