- 博客(9)
- 收藏
- 关注
转载 删除程序自身
(*//标题:自己删除自己说明:警告执行此程序将删除所在目录的所有文件及目录设计:Zswang日期:2002-01-29支持:[email protected]//*)///////Begin Sourceuses Windows, Dialogs, SysUtils, Controls;procedure DeleteMe(mDeleteDir: Boolean = False); { 自己删除
2005-04-15 11:35:00 722
转载 连接数据库
var OptionIni : TIniFile;function TDM_Frm.optionSet(conn: TAdoConnection; Param: string): boolean;var serverName ,UserName,pwd, DBName : string;begin result := True; try serverName := OptionIni
2005-04-15 09:59:00 699
转载 运行SQL语句
procedure RunSQL(sql : string);var comm : TAdoCommand;begin comm := TAdoCommand.Create(nil); comm.Connection := DM_Frm.AdoConn; comm.CommandText := sql; comm.Execute; FreeAndNil(Comm);end;
2005-04-15 09:44:00 710
转载 把事务处理,分离出来!
function BeginTrans: Integer;begin if DM_Frm.AdoConn.InTransaction then DM_Frm.AdoConn.RollbackTrans; Result := DM_Frm.AdoConn.BeginTrans;end;procedure CommitTrans;begin DM_Frm.AdoConn.CommitTra
2005-04-15 09:40:00 825
转载 得到周的描述
function getChinaWeek(adate : TdateTime) : string;var iWeek : integer;begin iWeek := dayofWeek(aDate); Result := ChinaWeek[iWeek - 1];end;
2005-04-15 09:11:00 688
转载 当前系统信息
function getSystemInfo : string;var midStr : string;begin case Win32Platform of VER_PLATFORM_WIN32_WINDOWS : midStr := Windows 9x; VER_PLATFORM_WIN32_NT : midStr := Windows NT; end; if W
2005-04-15 09:04:00 590
转载 获得当前应用程序的路径
function getApplicationPath : string;var strTmp : string;begin strTmp := getStanPath(ExtractFilePath(application.Exename)); result := strTmp;end;function getStanPath(const aPath : string) :string;b
2005-04-15 09:03:00 650
转载 通过回车控制光标向下一控件移动
procedure TFrom1.FormKeyPress(Sender: TObject; var Key: Char);begin if KEY = #13 then perform(WM_NEXTDLGCTL, 0, 0);end;
2005-04-15 08:46:00 854
转载 得到汉字的拼音
function TForm1.getpy(sHZ: string): string;var i: Integer; PY: string; s: string; function GetPYIndexChar(hzchar: string): char; begin case WORD(hzchar[1]) shl 8 + WORD(hzchar[2]) of $B0A
2005-04-14 23:10:00 755
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人