Subject Re: AW: [firebird-php] Database corruption
Author Barry Kukkuk
On Wed, 2003-12-03 at 13:56, Wolfgang Naber wrote:

> I got the parameters for the bde-component from the developer of the client-server application.
> DB.Params.Clear;
> DB.DriverName := 'INTRBASE';
> DB.Params.Values['BATCH COUNT'] := '200';
> DB.Params.Values['BLOB SIZE'] := '32';
> DB.Params.Values['BLOBS TO CHACHE'] := '64';
> DB.Params.Values['COMMIT RETRAIN'] := 'FALSE';
> DB.Params.Values['ENABLE BCD'] := 'FALSE';
> DB.Params.Values['ENABLE SCHEMA CACHE'] := 'FALSE';
> DB.Params.Values['LANGDRIVER'] := 'DBWINUS0';
> DB.Params.Values['MAX ROWS'] := '-1';
> DB.Params.Values['OPEN MODE'] := 'READ/WRITE';
> DB.Params.Values['SCHEMA CACHE SIZE'] := '8';
> DB.Params.Values['SCHEMA CACHE TIME'] := '-1';
> DB.Params.Values['SERVER NAME'] := ServerPfad;
> DB.Params.Values['SQLPASSTHRU MODE'] := 'SHARED AUTOCOMMIT';
> DB.Params.Values['USER NAME'] := User;
> DB.Params.Values['WAIT ON LOCKS'] := 'FALSE';
> DB.Params.Values['PASSWORD'] := Password;
> DB.Params.Values['DRIVER FLAGS'] := '4096';
> DB.LoginPrompt := False;
> ...
>
> IB.Params.Clear;
> IB.Params.Values['USER_NAME'] := User;
> IB.Params.Values['PASSWORD'] := Password;
> IB.Params.Values['LC_CTYPE'] := 'WIN1252';
> IB.LoginPrompt := False;
> IB.DataBaseName := ServerPfad;
>

What is the value of this constant (or variable)?
ServerPfad

> And this is my connection string:
>
> $conn = &ADONewConnection('ibase');
> $conn->charSet = 'WIN1252';
> $conn->buffers = 2048;
> $conn->dialect = 1;
> $db_server = 'localhost:/usr/local/fbk/wawi.gdb';
> $db_user = 'xyz';
> $db_pass = 'xyz';
> $db_database = '/usr/local/fbk/wawi.gdb';
> $conn->Connect($db_server, $db_user, $db_pass);
>

> Maybe transaction management is responsible for this issue. Yesterday i read the articel "Optimization I: Optimizing InterBase Applications" in which Craig Stuntz wrote "One important consequence of the principle of isolation is that every client running a SELECT statement must start ist, fetch, rows, and terminate the statement within the context of a single transaction".
>
> How is this achieved in a php-application? Until now i thought that this is handled automatically by the php interbase-interface. Is this correct?

It is impossible to issue any sql to firebird without a transactions
afaik. I think the PHP driver automatically starts a transaction, then
issues your sql and then commits the transaction.

Transactions cannot cause database corruption.


Barry
--
\' '/
(ò o)
.-------oOO----(_)-------------.
| |
| Barry Kukkuk |
| Barloworld Optimus |
| ============================ |
| barryk@... |
| barry@... |
| www.barloworldoptimus.com |
| www.kukkuk.org |
| ============================ |
| Proudly South African |
'--------------------oOO-------'
|__|__|
|| ||
ooO Ooo