������ |�����| ����� |  �������� 
English Russian
Devrace FIBPlus - �������, ������ � �������������������������������� ����������� Borland® Delphi" 5-7, Borland® C++ Builder 5-6 � Borland® Kylix" 3 � ������ �������� � Borland® InterBase® � Firebird ����� Direct InterBase API.


��������


���������


��������


������


�����-������


� ��������
  DEVRACE FIBPLUS
Printable

FIBPLUS

�������, �������

����������������
��������� ����������
������������
���������

������, ���������
��� ���������� FIBPlus?
������
���������

������!
��������� ������

FAQ
HelpDesk
�������� �� ������
����������

�������� �����

��������

��������
������ �������
���������

��������

� ��������
��������
�����-������


Devrace ����� ������ Borland Technology Partner

�� �������� ���������� Firebird community


Powered by Bitrix Site Manager - Content Management & Portal Solutions
Powered by Bitrix Site Manager - Content Management & Portal Solutions


FIBPlus: ����������� ��������� master-detail ��� ������ � InterBase � Firebird. ����� 2. �������� "�����" ��������. ������������� ����������� ��� ��������� �������� Primary Key.

�����: ������ ���������
���������: 638

���� �� ���������� ��������� �����-�� �������� � DBGrid1, �� �������, ��� � ������� ��������� �� ����� read-only ������. ��� ����, ����� ��� ������ ���� �������������, ��� "�����", ��� ���� �������� ��������� �������������� ��������, ������� ����� ������������� ���������� ����������� pFIBDataSet1 ��� �������������� ������ � DBGrid1. ���������� ��������� ��������:

���. 9.

FIBPlus �������� ����������� design-time �������� ��� �������������� � ��������� �������������� ��������. �� ������ ������� Generator SQLs �� ������������ ����, ���� ������� ������ ������� ���� �� ���������� pFIBDataSet1.

���. 10.

��� ��������� �������������� �������� ���������� ������� ������� �������� ������� � ������. ���� � ������� ��������� ������ ���� �������, �� ��� ����� ������� � ������ �������������. ����� ����� ���������� ������ ������ Get Table Fields ��� ���������� ������� "Key Fields" � "Update Fields". � ������ ������ ����� �������� �� ����, ������� ����� ��������� � ������� WHERE �� ���� �������������� ��������. � ������ "Update Fields" ���������� �������� �� ����, ������� �� ����� �������������. �� ��������� �������� ��� ���� ������� DEPARTMENT. ������ ���������� ������ ������ "Generate SQLs" � �������� ������������� ��� �������������� �������, ������� �� ������ ������� �� �������� SQLs. ��������, �� ������� ��������� ������ ��� �������� InsertSQL:

INSERT INTO DEPARTMENT(
    DEPT_NO,  DEPARTMENT,  HEAD_DEPT,  MNGR_NO,  BUDGET,  LOCATION,
    PHONE_NO
)
VALUES(
    ?DEPT_NO, ?DEPARTMENT,  ?HEAD_DEPT, ?MNGR_NO, ?BUDGET, ?LOCATION,
    ?PHONE_NO
)

�������� �������� ����� �� ������ ��� �������� RefreshSQL. ��� ����� �� ���������� ������, �� ���������� �� ������ ������ ���� ������ - �������! ������, ����� �������� ���� ��������, ����� ������������ ������� ����� ������ � DBGrid1, �� pFIBDataSet1 ������������� �������� �������� ���������� ?DEPT_NO, ?DEPARTMENT � �.�. ���� ���������� �����, ������� ������� ������������. �������� �������� �� ���� DEPT_NO. ��� ������������� ����, ������� �������� primary key ��� ������� � ��� ������ ��������� ���������� ��������. Interbase ���������� ����������� ����������� ��� ��������� ����� �������, ���������� ������������ � �������� ���� ������ - ��� ����������. ����������� ������������� ����������� ������� � ���, ��� �� ������ �������� ����� �������� ���������� � ���������� �� ����, ��� �������� ������ �� ������� ������. ����� ��� �����? ���� � ���, ��� ����� ���������� ������ ��������������� ������� (����� ��������), pFIBDataSet1 ������������� ��������� ������ �� RefreshSQL, ���������� � �������� ������� ������� �������� ����������. � ����� ������ ��� ����������� ���� ������������ �������� ���������� �����. ���� �� �� ������� ��� �������, � ����� ������������ ���, ��������� �������, �� �� �� ������ ���������� �������� DEPT_NO � ������ RefreshSQL, � ������ �� ������ ���������� ���������� ������. ����� �������, ���� �����-�� ���� ������ �������� ������ ��������� ���� ������, �� �� �� ������ ��� ���������, ���� �� ����������� ���� ������ �������. ���� �� �� ������� ������� ����� �������� ����������, ����� ������� ��� �������� ������� � ���������� �����������, �� ����� ������ ������������ ��� �� �������� ��� refresh'� ������� ������ � ����� "� �����" ���������� �������� ����� ��� �������� ��������������!

TpFIBDataSet ��������� ������������� �������� � ��������� �������� ���������� �����, ��������� ���������. ��� ����� ��� ���������� ��������� �������� AutoUpdateOptions:

���. 11.

������ �����, ����� ������� �������� ������� DEPARTMENT, �������� ��������� ���� DEPT_NO � �������� ���������� DEPT_NO_GEN. �������� WhenGetGenID ����� ��������� ��� ��������� ��������:

  • wgOnNewRecord - �������� �������� ���������� ����� ����� ���������� ������ ��� ����� ������;
  • wgBeforePost - �������� �������� ���������� ��������������� ����� ��������� ����� ������ �� ������;
  • wgNever - �� ������������ �������� ��������� �������� ��������.

� ����� ������� �� ������ �������� wgOnNewRecord, ����� ����� ������ � DBGrid1 �� �������� ���� DEPT_NO, ������� ����� �������� � �������. ������ �� ����� ��������� ���� ���������� � ��������������� �����-���� ������������ ������ � ���� �������� ����� ������:

���. 12.

�� ������� �����, ��� ���� ������������� �������� �������� ��� ���� DEPT_NO ������ 22. �������� ����� �������� �� ��� ����, ��� ����� ������������� ���� �������� �������� �� ��������� ��� ����� BUDGET � PHONE_NO.

��������� ������ ������� ��� �������.

��������� � ������


������

* �������� ���� ������.
* ���� HTML �� ��������������.


���� ���: 
�� ������ ��������. ������� ������ ������ ����� ������� �������. ����� (����� ���. 2) ���������� �����, ������� � ������������� �������:
������ ������� CREATE_PERSON, ����������� �������� �����, ����� ������� �� ���� ������. ����� ��������� ���, �� ����������� ������� �������� �� ������ �������� ��������� ���� CODPERS:

SET TERM !! ;
CREATE TRIGGER CREATE_PERSON FOR PERSON BEFORE INSERT
AS BEGIN
IF (NEW.CODPERS IS NULL) THEN /* ����������� ������ */
NEW.CODPERS = GEN_ID(GENPERSON, 1);
END !!
SET TERM ; !!
Alexander Bondar, 16:42:01
����� ������
����, 01:02:28
������ �������. ����, ��� �������, ������ ������� ����� �� ��������� ������ ���� �� �������
Serg Vostrikov, 14:03:34
� ������ ������ ������ ��������� ������:
NEW.CODPERS = GEN_ID(GENPERSON, 1);
IF (NEW.CODPERS IS NULL) THEN NEW.CODPERS = GEN_ID(GENPERSON, 1);
Denis Uskov, 21:51:08
������� �� �������� ������ ��������� ��������, ���������� �������� :)
������� �����, 03:55:03

��������� � ������



��� �� InterBase, Firebird � Yaffil. �������, ������, ��������, ������...

�������� ����� FAQ ��������
Legal Notices :: Privacy Policy