Skip site navigation (1) Skip section navigation (2)

not possible to create a database

From: vincent(dot)richomme(at)ratp(dot)fr
To: pgsql-odbc(at)postgresql(dot)org
Subject: not possible to create a database
Date: 2005-02-04 10:19:08
Message-ID: E23B4EE4F2A6F44B8660AA8723D0B82B012E1873@nyplme19.neuilly.ratp (view raw or flat)
Thread:
Lists: pgsql-odbc
Hi,

 

I have recently installed the PostGreSQl 8.0.1 on windows XP to migrate from
MySQL.

With my old application before to store data in the base I check it exists
and so I do the following :

 

m_strConn.Format("DRIVER={PostgreSQL};\

                  SERVER=127.0.0.1;\

                  PORT=5432;\

                  UID=root;\

                  PWD=123456");

 

 

// Try to open default database (dbBornes)

bRet = m_pDb.Open( m_strConn + _T( ";Database=dbBornes" ) );

 

//Database doesn't exist so create it

if ( !bRet){

bRet = m_pDb.Open(m_strConn);if (!bRet) goto lblExitOnErr;
<----------------- ERROR 80040e4e

      bRet = m_pDb.Execute( _T("CREATE DATABASE dbBornes;") );if (!bRet)
goto lblExitOnErr; 

...

}

 

This code works fine with MySQL and ACCESS but failed with PostGreSQL.

When 

Any suggestions? 

Responses

pgsql-odbc by date

Next:From: Christof GlaserDate: 2005-02-04 12:21:32
Subject: Re: not possible to create a database
Previous:From: Dave PageDate: 2005-02-04 08:49:14
Subject: Re: [ODBC] odbc.sql?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group