Subject | Re: [IBO] Problem with CreateDatabase |
---|---|
Author | Helen Borrie |
Post date | 2009-11-05T23:07:39Z |
At 08:41 AM 6/11/2009, you wrote:
If it is Classic, then your problem is that you can't use cpLocal protocol. Use cpTcpip and make it:
#define DATABASEDIR "localhost:C:\\_E\\AADBTest\\DatabaseDir"
Otherwise, the 'unavailable database' exception usually means the server isn't running.
Helen
>Using IBO 4.9.7, BCB6, Windows XP. Firebird 1.5.6 running as service. The DATABASEDIR exists and is empty.It looks as though you are running Classic. You can check that by inspecting the properties of the service to find out the executable name. "fbserver.exe" is Superserver, "fb_inet_server.exe" is Classic.
>The code snippet:
> // The macro "zz" traces and sets params for the "catch" block which displays occurred errors.
> #define DATABASEDIR "C:\\_E\\AADBTest\\DatabaseDir"
> #define TABNAME "BeobachtungIBO"
> #define TABEXT "FDB"
> zz(900); TIBODatabase * ttb = new TIBODatabase (NULL);
> zz(901); ttb -> DatabaseName = DATABASEDIR "\\" TABNAME "." TABEXT;
> zz(902); ttb -> PageSize = 8192;
> zz(903); ttb -> Username = "KARL";
> zz(904); ttb -> Password = "FORMCALC";
> zz(905); ttb -> CharSet = "Win1252";
> zz(906); ttb -> Protocol = cpLocal;
> zz(907); ttb -> CreateDatabase ();
>yields:
>[5888] Zeile 900
>[5888] Zeile 901
>[5888] Zeile 902
>[5888] Zeile 903
>[5888] Zeile 904
>[5888] Zeile 905
>[5888] Zeile 906
>[5888] Zeile 907
>[5888] Fehler in Zeile 907:
>[5888] ISC ERROR CODE:335544375
>[5888]
>[5888] ISC ERROR MESSAGE:
>[5888] unavailable database
>[5888] - ERROR!
>
>Why does CreateDatabase refuse to create the "BeobachtungIBO.FDB"?
>Earlier versions (about of 2005) did it.
If it is Classic, then your problem is that you can't use cpLocal protocol. Use cpTcpip and make it:
#define DATABASEDIR "localhost:C:\\_E\\AADBTest\\DatabaseDir"
Otherwise, the 'unavailable database' exception usually means the server isn't running.
Helen