DelphiÖ÷´Ó±íÀý×Ó
ÔÚsql server µÄnorthwide Öн¨Á¢Ö÷±í
create table sell_h( sell_id char(10),cust_name char(10) Primary key(sell_id) )
go
create table sell_h( sell_id char(10),inv char(10) ,amt float,qty float Primary key(sell_id,inv) )
Ê×ÏÈ,ҪעÒâÒÔÏÂÉèÖÃ
1.ҪעÒⱨ´Ó±íqrydetailÉèÖÃ,Åú±£´æ¿ªÊ½. ¼´.locktype= batchoptimistic ,cursortype=keyset,cursorlocation
=cluseclient
2.
procedure TForm1.FormCreate(Sender: TObject);
begin
qrymain.Close;
qrydetail.Close;
qrymain.SQL.Add(' select * from sell_h') ;
qrydetail.SQL.add('select * from sell_b where sell_id = :sell_id') ;
qrymain.Open;
qrydetail.Open;
end;
3.
procedure TForm1.qrymainAfterScroll(DataSet: TDataSet);
begin
qrydetail.Close;
qrydetail.Parameters.ParamByName('sell_ID').Value := qrymain.fieldbyname('sell_id').value;
qrydetail.Open;
end;
ÒÔÉϾÍÊÇÖ÷ÒªµÄÉèÖÃ,»¹ÓÐ×¢ÒâÖ÷´Ó±íµÄ±£´æÎÊÌâ:
Ö÷±í²»ÒªÓÃÅú´¦Àí£¬Ö±½Ó±£´æ,°ÑltBatchOptimisticÈ¥µô
Ã÷ϸ±íÓÃÅú´¦Àí¡£
±£´æʱÏȱ£´æÃ÷ϸ±í£¬ÔÙ±£´æÖ÷±í¼´¿É¡£
ADOÖÐADOTable¡¢ADOQueryºÍADODataSetÖ÷´Ó±íÉèÖÃ
1¡¢ADOTableµÄÖ÷´Ó±íÉèÖÃ
Ö÷±íÃûΪjxc_out£¬´Ó±íÃûΪjxc_out_detl Ö÷±íÓë´Ó±í¹ØÁª×Ö¶ÎΪdraw_no
tbM: TADOTable;
tbD: TADOTable;
dtsM: TDataSource;
dtsD: TDataSource;
tbM.TableName=jxc_out
tbD.TableName=jxc_out_detl
dtsM.DataSet=tbM
dtsD.DataSet=tbD
tbD.MasterSource=tbM
ÔÚ´Ó±íµÄ[tbD]ÖÐÑ¡ÔñMasterFieldsÊôÐÔ£¬Ñ¡ÔñÖ÷±íºÍ´Ó±í¹ØÁªµÄ×ֶΣ¬È»ºóÖ´ÐÐtbM.openºÍtbD.Open¼´¿É
2¡¢ADOQueryµÄÖ÷´Ó±íÉèÖÃ
Ö÷±íÃûΪjxc_out£¬´Ó±íÃûΪjxc_out_detl Ö÷±íÓë´Ó±í¹ØÁª×Ö¶ÎΪdraw_no
adqM: TADOQuery;
adqD: TADOQuery;
dtsM: TDataSource;
dtsD: TDataSource;
tbM.sql.text=select * from jxc_out
tbM.sql.text=select * from jxc_out_detl where draw_no=:draw_no
dtsM.DataSet=adqM
dtsD.DataSet=adqD
dtsD.DataSource=dtsM
Ö´ÐÐadqM.openºÍadqD.Open¼´¿É
3¡¢ADODataSetÖ÷´Ó±íÉèÖÃ
¸úADOQueryÉèÖò¶à£¬²»¹ýADODataSetÉèÖõÄÊÇcommandtext
Ïà¹ØÎĵµ£º
תÔØ×Ô£ºhttp://www.cnblogs.com/jdmei520/archive/2009/06/17/1505053.html
Webservice¼¼ÊõµÄ³öÏÖ½«¸÷ÖÖ¿ª·¢¼¼ÊõºÍÓïÑÔÍêÈ«µÄÈÚºÏÁË£¬ÏÂÃæ¾ÍÕâÖÖÈÚºÏÔÚC#ºÍdelphiÖ®¼äµÄ½»»¥×öÒ»´ÎÈ«ÃæµÄÌåÏÖ
1.ʹÓÃC#´´½¨Ò»¸öWebservice·þÎñ¡£
ʹÓÃvs2005µÄÄ£°å´´½¨C#µÄwebservice·Ç³£ÈÝÒס£ÔÎļþÈçÏÂ:
[WebService(Namespace  ......
dynamic¾ÍÊÇËüÊǶ¯Ì¬·½·¨£¬Ã»Óо²Ì¬µØÖ·£¬ËùÒÔËÙ¶ÈÂýÒ»µã
virtualÊÇÐé·½·¨£¬Èç¹ûÔÚ»ùÀàÖв»ÉùÃ÷³ÉÐé·½·¨µÄ»°£¬¼Ì³Ðºó£¬¸Ã·½·¨»áÌáʾһ¾¯¸æÐÅÏ¢£¬°Ñ»ùÀàÖз½·¨ÆÁ±ÎµôÁË
---------------------------------------------------------------
¶¯Ì¬£¨Dynamic£©ºÍÐéÄ⣨Virtual£©ºó¶¼¿ÉÒÔʹÓÃOverride¹Ø¼ü×ÖÔÚÅÉÉúÀàÖжԶÔÓ¦ ......
¹ý³ÌÎÞ·µ»ØÖµ£¬º¯ÊýÓзµ»ØÖµ¡£
procedure MyProc(m,n : Integer; o : String; p : Single = 2.5; q : String = 'Delphi');
ÈçÉÏÀýËùʾ£¬¹ý³ÌÉùÃ÷ºÍ¶¨ÒåÖУ¬¶à¸ö²ÎÊýÊÇÓ÷ֺŸô¿ªµÄ£¬µ«ÔÚµ÷ÓÃʱÊÇÓöººÅ¸ô¿ªµÄ ¡£eg£º
......
1.Round£¨ËÄÉáÁùÈëÎåÁôË«£©
¹¦ÄÜ˵Ã÷£º¶ÔÒ»¸öʵÊý½øÐÐËÄÉáÎåÈë¡£(°´ÕÕÒøÐмÒËã·¨)
Àý£º
var
i, j: Integer;
begin
i := Round(1.5); // iµÈÓÚ2
j := Round(2.5); // jµÈÓÚ2
end;
ÔÚDelphiÖÐʹÓÃRoundº¯ÊýµÃµ½µÄ´ð°¸ÓÐʱÓëÎÒÃÇËùÔ¤ÆڵĻ᲻̫һÑù£º²ÉÓõÄÊÇËÄÉáÁùÈëÎåÁôË«¡£¼´µ±Éá»òÈëλ´óÓÚ»òСÓÚÎåÊ ......
ÓÃDelphi¿ª·¢Êý¾Ý¿âÓ¦Óã¬Ò»°ã»áÉæ¼°µ½ÉÁÆÁ£¨Splash£©¡¢µÇ¼´°¿Ú¡¢Ö÷Êý¾ÝÄ£¿é£¨»òÖ÷Êý¾Ý¿âÁ¬½Ó£©ÒÔ¼°Ö÷´°¿Ú¡£Í¨³£ÔÚÏîÄ¿ÎļþÖУ¬splash´°¿ÚÏÔʾ¹ý£¬Ò»Ð©ÐèÒª¼ÓÔصÄ×ÊÔ´¡¢´°¿Ú¼ÓÔعýºó£¬Application.Run֮ǰ£¬½øÐÐÓû§µÇ¼¡£
//²âÊÔCSDN²©¿Í¶ÔDELPHI´úÂëµÄÖ§³Ö
program TEST;
uses
Forms,
Windows,
MainF in 'Ma ......