Ò»¸ö·½±ãÓÐÓõÄDelphiÊý¾Ý¿â²Ù×÷Àà(ת)
unit MyADO;
interface
uses
SysUtils, Classes,ADODB,DB,Variants,StdCtrls,Dialogs;
type
TMyADO = class(TComponent)
private
Connection: TADOConnection;
Query: TADOQuery;
Table: TADOTable;
FConnectionString:string;
procedure InitQuery(InputQuery: TADOQuery; QueryString: String);
function CheckParaEqual(QueryString: String; ParameterList: TStringList):Boolean;
procedure InitParameter(InputQuery:TADOQuery;QueryString:string;ParameterList:TStringList);
public
constructor Create(ConnectionString: String);virtual;
destructor Destory;virtual;
procedure SetConnectionString(ConnectionString: string);
function GetConnection():TADOConnection;overload;virtual;
function GetConnection(ConnectionString: String): TADOConnection;overload;virtual;
function GetQuery: TADOQuery;overload;virtual;
procedure GetQuery(InputQuery: TADOQuery; QueryString: String);overload;virtual;
procedure GetQuery(InputQuery:TADOQuery; QueryString: String; ParameterList: TStringList);overload;virtual;
function GetTable: TADOTable;overload;virtual;
function GetTable(TableName: String): TADOTable;overload;virtual;
function GetTable(TableName: String; Connection: TADOConnection):TADOTable;overload;virtual;
function GetExecuteScalar(QueryString: String): Variant;overload;virtual;
function GetExecuteScalar(QueryString: String; ParameterList: TStringList): Variant;overload;virtual;
function GetExecuteNoQuery(ExecuteSQL:String):Boolean;overload;virtual;
function GetExecuteNoQuery(ExecuteSQL: String; ParameteList: TStringList):Boolean;overload;virtual;
Ïà¹ØÎĵµ£º
ÔÚÉÏһƪÖУ¬ÎÒÃǼòµ¥µÄʵÏÖÁËÒ»¸ö¶ÔDelphi×ÔÉíµÄTEdit±à¼¿ò¿Ø¼þµÄÒ»¸öÀ©³ä£¡µ«ÊÇÎÒÃDz¢²»ÄÜÏñDelphi×Ô¼ºµÄTEditÒ»Ñù£¬Äܹ»
ÔÚÉè¼Æ״̬ϽøÐÐÉè¼Æ£¬¶øÊǷǵÃÒª×Ô¼ºÊÖ¶¯´´½¨¿Ø¼þ£¬È»ºó²ÅÄÜʹÓá£Õâ¸öËäȻ˵ҲÊÇ×é¼þ£¬µ«ÊÇȴʧȥÁË×é¼þµÄ¿ÉÉè¼ÆµÄ·½±ãÐÔ£¬½ö½ö¿É×÷Ϊһ¸öÀà¿âÀ´Ê¹Óá£
ÏÖÔÚÎÒ¾ÍÀ´½éÉÜһϣ¬ÈçºÎÈÃÕâ¸ö×é¼þ×¢ ......
µÚÒ»ÖÖ£ºÐèÒªÒýÓÃWindowsµ¥Ôª
ShowMessage(IntToStr(GetSystemMetrics(SM_CYSCREEN)-GetSystemMetrics(SM_CYFULLSCREEN)-GetSystemMetrics(SM_CYCAPTION)));
µÚ¶þÖÖ£ºÐèÒªÒýÓÃWindowsµ¥Ôª
function GetSystemTaskBarHeight:Integer;
var
R:TRect;
begin
SystemParametersInfo(SPI_GETWORKAREA,0,@R,0);
Resul ......
Windows ÏÂÒ»¸öµäÐ͵ÄÌØÕ÷¾ÍÊǶàÈÎÎñ£¬ÎÒÃÇ¿ÉÒÔͬʱ´ò¿ª¶à¸ö´°¿Ú½øÐвÙ×÷£¬Ò²¿ÉÒÔͬʱÔËÐгÌÐòµÄ¶à¸öʵÀý£¬±ÈÈç¿ÉÒÔ´ò¿ªÐí¶à¸ö×ÊÔ´¹ÜÀíÆ÷½øÐÐÎļþµÄÒƶ¯¸´ÖƲÙ×÷¡£µ«ÓÐʱ³öÓÚijÖÖ¿¼ÂÇ£¨±ÈÈ簲ȫÐÔ£©£¬ÎÒÃÇÒª×ö³öһЩÏÞÖÆ£¬ÈóÌÐòÖ»Äܹ»ÔËÐÐÒ»¸öʵÀý¡£ÔÚDelphi±à³ÌÖУ¬±ÊÕß×ܽá³öÁËÒÔϼ¸ÖÖ·½·¨£º
¡¡¡¡Ò»¡¢ ²éÕÒ´°¿Ú·¨
¡¡¡ ......