ÓÃPLSQL×Ô¶¯Éú³ÉÊý¾Ý¿â±íµÄDelphi¶ÔÏó
DECLARE
TYPE TY_QUECUR IS REF CURSOR;
CUR_COLUMNS TY_QUECUR;
SQLCMD VARCHAR(500);
TABNAME VARCHAR(20);
COLNAME VARCHAR(50);
COLTYPE VARCHAR(20);
COLCOMMENT VARCHAR2(50);
COLLENGTH INTEGER;
COLPRECISION INTEGER;
I INTEGER;
COLLIST VARCHAR(1000);
VCOLLIST VARCHAR(1000);
DelphiDS VARCHAR2(20);
BEGIN
TABNAME:= 'DIC_USER';
DelphiDS:= '__DS';
I:= 0;
COLLIST:= '';
VCOLLIST:= '';
SQLCMD:= 'SELECT A.COLUMN_NAME, A.DATA_TYPE,B.COMMENTS,A.DATA_LENGTH,A.DATA_PRECISION '
||'from USER_TAB_COLUMNS A LEFT JOIN USER_COL_COMMENTS B '
||'ON A.COLUMN_NAME=B.COLUMN_NAME AND A.TABLE_NAME=B.TABLE_NAME WHERE A.TABLE_NAME= '''|| TABNAME || '''';
DBMS_OUTPUT.PUT_LINE('//==============================================================');
DBMS_OUTPUT.PUT_LINE('//Éú³ÉDelphi¶ÔÏó');
DBMS_OUTPUT.PUT_LINE('//==============================================================');
DBMS_OUTPUT.PUT_LINE('unit u'|| INITCAP(TABNAME)||';');
DBMS_OUTPUT.PUT_LINE('interface');
DBMS_OUTPUT.PUT_LINE('uses Windows, Messages, SysUtils, Variants, Classes, DB, DBClient;');
DBMS_OUTPUT.PUT_LINE('Type');
Dbms_Output.PUT_LINE(' TEditMode=(emAppend, emEdit, emDelete);');
DBMS_OUTPUT.PUT_LINE(' T'||TABNAME||'= Class');
DBMS_OUTPUT.PUT_LINE('private');
DBMS_OUTPUT.PUT_LINE(' fCdsDatas: TClientDataSet;');
OPEN CUR_COLUMNS FOR SQLCMD;
FETCH CUR_COLUMNS INTO COLNAME, COLTYPE, COLCOMMENT, COLLENGTH, COLPRECISION;
WHILE CUR_COLUMNS%FOUND LOOP
IF I = 0 THEN
COLLIST:= COLNAME;
ELSE
COLLIST:= COLLIST || ', '|| COLNAME;
 
Ïà¹ØÎĵµ£º
1. ¸´ÔÓµÄ×Óϵͳ
unit uSubObject;
interface
type
{ TAmplifierÓëTTuner£¬TCDPlayer£¬TDVDPlayerÏ໥ÒÀÀµ¡£ }
{ ÔÚTTunerµÈµÄ¼òµ¥ÊµÏÖʱÓò»µ½¶ÔTAmplifierµÄÒýÓ㬠}
{ µ«ÏÖʵÉú»îÖоÍÓ¦¸ÃÈÃTAmplifierÌṩ·þÎñ£¬ËùÒÔÕâÀï±£ÁôÁË¡£ }
{ TProjector¶ÔT ......
1. ÃüÁîµÄ½ÓÊÜÕß
unit uReceiveObject;
interface
type
TLight = class(TObject)
public
procedure Open;
procedure Off;
end;
TGarageDoor = class(TObject)
public
procedure Up;
procedure Down;
procedure Stop;
procedure LightOn;
procedure LightOff;
end; ......
ûÓÐÓ¦ÓÃ״̬ģʽµÄ´úÂë
1. ¹¤³ÌÎļþ
program Project1;
{$APPTYPE CONSOLE}
uses
uGumballMachine in 'uGumballMachine.pas';
var
aGumballMachine: TGumballMachine;
begin
aGumballMachine := TGumballMachine.Create(5);
aGumballMachine.InsertQuarter;
aGumballMachine.TurnCrank;
Writeln; ......
¹¹½¨ Windows SOAP ·þÎñÆ÷Ó¦ÓóÌÐò
Ê×ÏÈÔÚ Windows ÉϹ¹½¨·þÎñÆ÷£¬È»ºóÔÚ Linux ÉϹ¹½¨¿Í»§»ú¡££¨Èç¹ûÐèÒª£¬¿ÉÒÔʹÓÃÆäËü·½·¨ — »òÕß½«ËüÃÇÈ«²¿¹¹½¨ÔÚ Windows »ò Linux ÉÏ¡££©¶ÔÓÚ Windows SOAP ·þÎñÆ÷£¬Æô¶¯ Delphi 7 Enterprise£¬Ö´ÐÐ File -> New -> Other£¬×ªÖÁ¶ÔÏó×ÊÔ´¿â£¨Object Repository£©µÄ ......
Ò»¡¢Òý×Ó£º
ÏÖÔÚµÄWindowsÓ¦ÓóÌÐò¼¸ºõ¶¼Ê¹ÓÃͼ±ê¡¢Í¼Æ¬¡¢¹â±ê¡¢ÉùÒôµÈ£¬ÎÒÃdzÆËüÃÇΪ×ÊÔ´£¨Resource£©¡£×î¼òµ¥µÄʹÓÃ×ÊÔ´µÄ°ì·¨ÊÇ°ÑÕâЩ×ÊÔ´µÄÔ´Îļþ´òÈëÈí¼þ°ü£¬ÒÔ·½±ã³ÌÐòÐèÒªµÄʱºòµ÷Óá£×ÊÔ´ÊdzÌÐòµÄÒ»²¿·Ö£¬³ÌÐòÒªÕý³£ÔËÐоÍÀë²»ÁË×ÊÔ´Îļþ¡£µ«ÊÇËüÊDz»¿ÉÖ´ÐдúÂë¡£
ΪÁ˸üºÃµØ¹ÜÀí×ÊÔ´£¬DelphiÖÐÌṩÁËÒ»ÖÖ.RESÀàÐ ......