Delphi (FAQ)

Q>:

e FreeIBComponents?

A>:

FreeIBComponents (ee - FIBC) - p e y
Interbase Delphi y BDE. FIBC pee py
Interbase API e e p, pe pp
e pe Interbase. p db-aware
, Delphi. e.
p - Gregory Deatz (gdeatz@hlmdd.com).

Q>:

K ep FIBC - e?

A>:

e e FAQ - 07 Jun 1999 .
FIBC e e-ep.

Q>:

e y ep FIBC?

A>:

e ep FIBC pey:

http://www.interbase.com/download ,
http://ib.demo.ru
FIBPlus (
email: buzz@tavrey.odessa.ua ;FidoNet: 2:467/44.37)
http://www.geocities.com/buzz_ss.
.

Q>:

e p epe FIBC ye, e epe BDE?

A>:

1. e pep p, e runtime.
2. p e .
3. "" .
4. pee, yee FIBC e ye epe BDE, e pe
y p.
5. p FIBC e p
Interbase.

Q>: FIBC c Delphi?

A>: , {$DEFINE VER120}
FIBdataset.pas

Q>:

y FIBC p C++ Builder.

A>:

- p VCL FIBC ++ Builder 1.0 pe
e. C++ Builder 3.0 FIBC e pe. e
p y Component/Install new component, e Unit file name y
FIBDataset.pas ye, Ok. e pe
gds32.lib . ee epe Component/Install packages
package FIBC, e, e .

... TFIBQuery.hpp
__property EOF;
, stdio.h
#define EOF (-1)
FIB TFIBQuery.pas
------
property BOF: Boolean read FBOF;
property EOF: Boolean read GetEOF;
------

------
property Bof: Boolean read FBOF;
property Eof: Boolean read GetEOF;
------
, .

Q>:

Delphi, FIBC. ey e ye yey
epepy?

A>:

FIBC peye ye e Interbase.

Q>:

FIBTransaction.Commit p e e?

A>:

ee, pe AUTOCOMMIT BDE e
ep ey e, p p p
e p e e. p ee
e e FIBC, Interbase. e , e ep
Interbase ee p. ee,
pp e epep e
e ey yee e Commit/Rollback. Peeye
e TFIBTransaction.CommitRetaining, p e
Commit e p ypp (p Interbase).

Q>:


?

A>:

1. , , :

with FIBDatabase do begin
DBParams.Clear;
DBParams.Add('isc_dpb_user_name=SYSDBA');
DBParams.Add('isc_dpb_password=masterkey');
UseLoginPrompt:=false;
Connected:=true;
end;
2. :
:
Autoexec.bat
SET ISC_USER=SYSDBA
SET ISC_PASSWORD=MASTERKEY
TFIBDatabase.DBParams ,
lc_ctype=win1251. ( : ))

isc_dpb_ , DBParams, .

Q>:

He ye e pee y.

A>:

-, yee,
win1251. -, e DBParams ep e
TFIBDatabase isc_dpb_lc_ctype=WIN1251. pe isc_dpb_
y.

Q>:

p ype ee pp . ey?
He y ee epepe, y e epey
p. ey?

A>:

y y pep p y.
ep ye e, ye epe ype p,
p pe (pe wait), p ye p - pe
no_rec_version y p. p eee pe ,
pep, p TRParams y ep e TFIBTransaction
eye pep:

isc_tpb_write
isc_tpb_nowait
isc_tpb_read_committed
isc_tpb_rec_version

isc_tpb_ .
e peeye pep p Interbase
API Guide (p. 46 Interbase Mediakit).

Q>:

FIBDataSet.Open
pbd^[i] := nil FetchCurrentRecordToBuffer.

A>:

ee ep FIBC ee ey pye y ,
p e y p .

Q>:

y y e p peyp, y TFIBQuery.
e :

with FIBQuery do begin
SQL.Text:='execute procedure MyProc returning_values ?param';
ExecQuery;
MyParam:=Params.ByName['PARAM'].AsInteger;
end;

ey e ye y pey p p peyp?

A>:

P yy eye pep:

pep 1:
with FIBQuery do begin
SQL.Text:='select * from MyProc';
ExecQuery;
MyParam:=Fields[0].AsInteger;
Close;
end;

pep 2:
with FIBQuery do begin
SQL.Text := 'execute procedure Get_UID';
ExecQuery;
UID := FieldByName('UID').AsInteger;
Close;
end;

K, peey e p peyp suspend,
e e peyp pe e y py. e
pp e pe,
epee epep pey e p peyp.

Q>:

K p blob pe FIBC?

A>:

p pep p blob-. FIBDatase1BLOBFIELD - e
BLOB e FIBDatabase1

- OleContainer

var S: TStream;
begin
if not FIBDataset1BLOBFIELD.IsNull then
begin
S:=FIBDataset1.CreateBlobStream(FIBDataset1BLOBFIELD, bmRead);
try
OleContainer1.LoadFromStream(S)
finally
S.Free
end;
end;
end;

-e OleContainer (e BeforePost)

var S: TStream;
begin
S:=FIBDataSet1.CreateBlobStream(FIBDataSet1BLOBFIELD, bmReadWrite);
try
OleContainer1.SaveToStream(S)
finally
S.Free
end;
end;


 http://www.interface.ru
 http://www.interface.ru/home.asp?artId=23161