Re: not possible to create a database

Поиск
Список
Период
Сортировка
От Christof Glaser
Тема Re: not possible to create a database
Дата
Msg-id 4DF0383E-76A7-11D9-95A4-000A957E650E@gl.aser.de
обсуждение исходный текст
Ответ на not possible to create a database  (vincent.richomme@ratp.fr)
Список pgsql-odbc
Hi Vincent,

Am 04.02.2005 um 11:19 schrieb vincent.richomme@ratp.fr:

> 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;

You must connect with a database name. If you want to create a new
database, you should connect to 'template1'.

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

Best regards,

Christof Glaser
--
--      gl.aser   .   software engineering  .   internet service
-- Doelitzer Strasse 37  .  D-04277 Leipzig   .   fon +49-341-303 20 51
-- http://gl.aser.de/ .  sms +49-177-779 28 43 . fax +49-0341-303 20 52


В списке pgsql-odbc по дате отправления:

Предыдущее
От: vincent.richomme@ratp.fr
Дата:
Сообщение: not possible to create a database
Следующее
От: vincent.richomme@ratp.fr
Дата:
Сообщение: How to convert this mysql syntax