三层开发
在找工作过程中,很多人问懂不懂三层开发。不懂三层开发是不错,然而,目前还是不懂。网络资料显示:ADOCONnection,socketConnection,Webconnection.。其中,ADOCONNECTION就没有被包括到三层里。为什么 呢?然而,我开发的小系统,可以在局域网内发布使用,一个EXE文件,一个数据库连接配置(INI)文件,或者一些DLL文件。那么能在局域网发布的算不算是三层。也许这只是两层,或者 是一层。因为服务器端没有我开发的服务器端程序,只要SQLserver2000服务器正常就行了。[@more@]
delphi 设置 DBGrid 列固定宽度
{设置 DBGrid 列 固定 宽度为 100 的过程 }procedure TBOMFindForm.SetColumnWidth; var i:integer;begin for i:=0 to DBGBomFind.Columns.Count-1 do begin DBGBomFind.Columns[i].Width:=100; end;end;[@more@]
是否要退出本系統
procedure TMain.FormClose(Sender: TObject; var Action: TCloseAction);beginif MessageBox(0,'是否要退出本系統?','揭示信息',MB_YESNO+MB_ICONQUESTION)=IDYES thenbeginApplication.Terminate;endelsebeginActi...
DELPHI 新增与修改例子
DELPHI 新增与修改例子 当新增记录时 有判断编号是否与 存在,如果存在则不保存。修改:修改操作不对编号进行修改。[@more@] private { Private declarations } cActive:string; //设置新增'I'、修改标志'U':procedure TEduForm.SaveBtnClick(Sender: TObject); var csql:string;begin //保存学历资料。 If cActive='I' Then begin with udm.Qry_edu do begin close; sql.Clear; sql.Add('select * from bas_education where eduNo='+quotedStr(trim(EduNoEdt.Text))) ; open; if udm.Qry
DELPHI刪除控制對象
在修改程序的时候突然发现删除继承的窗体中的控件属性时出现错误:selection contains a component introduced in an ancestor form while cannot be deleted 解決方式: 右擊"Object TreeView"窗口裡需要刪除對象名稱.在彈出的列表中選擇"Edit-->Delete" 進行刪除對象.[@more@]
DELPHI从INI里取文件路径
(1)DELPHI从INI文件里取共享文件夹的路径值。并打开共享文件。不足之处是,当文件类型没有指定打开方式,无法打开,而程式没有任何提示。(2)在DELPHI代码中,设定DBGRID的栏位的名称与宽度。[@more@]unit Wip_Bom_Unit;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Mask, DBCtrlsEh, StdCtrls, ExtCtrls, Grids, DBGrids, ComCtrls, DB,shellApi ,IniFiles;type TFrm_Wip_Bom = class(TForm) Panel1: TPanel; Label1: TLabel; Panel2: TPanel; Type_No_Edt:
DELPHI7 FASTREPORT4.0設置實例
FastReport4.0中如何关联程序中的数据库组件,如ADOQuery中的数据到报表中? 或是应如何做才能把动态数据关联到报表中?在程序主界面中拖入一个ADOTable然后设置其ConnectString的属性与指定数据库相连 再在ADOTable的TableName属性中选择你要关联的表 然后再往主界面中拖入一个frxDBDataset,将它的DateSet属性指定为ADOTable 然后进去FastReport界面中 在菜单栏中选[Report-> Data]就会出现让你选择DateSet的对话框 选择打勾,然后在右边的Data中就可以看见表的列了 再将列名拖动就可以 [@more@]打開"主项数据(Master
保存功能
procedure THolidayRequisitionForm.SaveBtnClick(Sender: TObject); var csql,csql2:string;begin csql2:='select * from holidayReq where deptNo='+quotedstr(trim(deptNocbm.text)); csql2:=csql2+' and...
DELPHI7安装QuickReport后
安装 QuickReport后 编译就出现'file not found:'QRPDFFilt.dcu'什么原因啊? *************** 无法编译,请高手解答找到'QRPDFFilt.dcu'的位置,加到SEARCH PATH 中就可以了"Project->Options->Directories/Conditionals->Search path"或者将 ‘QRPdfFilt.dcu’文件复制到SEARCH PATH 的默认路径下。[@more@]DELPHI 7 自带的QuickReport控件,在编译时提示:File not found 'QRSearchDlg.dcu'然后在安装目录搜索此文件,没找到。解决方式:网络里下载 QuickReport.v4.5.for.Delphi7.rar 并安装 即可。
Delphi 7中仍然存在Quick Report
Delphi 7中仍然存在Quick Report,只是因为Delphi 7默认的报表工具为Rave,所以在工具条上找不到。你可以使用Components|Install Packages,然后点击Add,找到c:''program files''borland''delphi7''bin 目录并添加dclqrt70.bpl。[@more@]
DELPHI 写入注册表自动运行
uses registry;procedure TKeyReportForm.AutoRun; var reg:TRegistry; keyFilePath:string;begin {keyFilePath获取文件详细路径。} keyFilepath:=extractFilePath(application.ExeName)+extractFileName(...
DELPHI 用INI 文件设置数据库连接
DELPHI 用INI 文件设置数据库连接 实例unit Unit_DM;interfaceusesSysUtils, Classes, DB, ADODB,inifiles,windows,forms,controls;[@more@]typeTDM = class(TDataModule)ADOConn: TADOConnection;DS_BomFind: TDataSource;Qry_BomFind: TADOQuery;procedure DataModuleCreate(Sender: TObject);private{ Private declarations }public{ Public declarations }userIdStr,passwordStr,ServerNameStr,dataBaseNameStr,inifilePath:string;end;varDM: TDM;implementation{$R *.dfm}procedure TDM.DataModuleCreate(Sender: TObject);varconn:
TBComboBoxEh 下拉列表框數據表列資料
// TBComboBoxEh 下拉列表框,加載數據庫的選擇資料。// 通用 過程 // 調用方式: //procedure Tfrm_makep.FormCreate(Sender: TObject);// begin// AddComBoxStr(qry_sel,'YPSZ',DBComboBoxEh7);// END; procedure AddComBoxStr(vTableName,vType: string;vComBox: TDBComboBoxEh);//解決小廖的ComBox問題var lClientDataSet: TClientDataSet; li: integer;begin lClientDataSet := GetTmpDataSet(0); lClientDataSet.Close; lClientDataSet.CommandText := 'select id,mc from t_combo where app_id='+#39+vTableName+#39+
MSSQL 新建表
if exists ( select 1 from sysobjects where name='bas_edu' and type ='U' )begin drop table bas_edu ;end;gocreate table bas_edu( --学历表 eduNo varchar(10) not null , --编号 eduName varchar(20) not null, --名称 eduMemo varchar(30) not null default '' ,--备注 creater varchar(10) not null, --建立人 createDate date , -- 新增日期 constraint bas_edu_pk primary key(eduNo) --eduNo 为主键 ) go[@more@]
在linux下的C程序例子
在linux下的C程序例子。检查 输入的年份 是否为闰年。1、编写一个布尔函数int is_leap_year(int year),判断参数year是不是闰年。如果某一年的年份能被4整除,但不能被100整除,那么这一年就是闰年,此外,能被400整除的年份也是闰年。[@more@]#include <math.h>#include <stdio.h> void is_leap_year(int years){ if((years % 4==0 && years%100 !=0) || years % 400 == 0) { printf(" %d is leap year.n",years); return ; } else { printf("%d is not leap year . n",year
delphi 取得、设置文件属性
label1.Caption:= intToStr(FileGetAttr('d:txt.txt') );// 取得文件属性,35:隐藏、只读,存档,32:存档,33:只读 ,34: 隐藏 edit1.Text:=intToStr( fileSetAttr('d:txt.txt',32)) ; //设置文件属性,设置成功则返回‘0’[@more@]
Visual Studio 2005(C# ) 快捷键
调试快捷键 F6: 生成解决方案 Ctrl+F6: 生成当前项目 F7: 查看代码 Shift+F7: 查看窗体设计器 F5: 启动调试 Ctrl+F5: 开始执行(不调试) Shift+F5: 停止调试 Ctrl+Shift+F5: 重启调试 F9: 切换断点 Ctrl+F9: 启用/停止断点 Ctrl+Shift+F9: 删除全部断点 F10: 逐过程 Ctrl+F10: 运行到光标处 F11: 逐语句From:http://blog.sina.com.cn/s/blog_474b48e00100cf52.html[@more@] 编辑快捷键 Shift+Alt+Enter: 切换全屏编辑 Ctrl+B,T / Ctrl+K,K: 切换书签开关 Ctrl+B,N / Ctrl+K,N: 移动到下一书签 Ctrl+B,P: 移动到上一书签
如何 实现 delphi edit 里指定输入时间格式
如何 实现 delphi edit 里指定输入时间格式,如:2008-12-25 15:58 , 当月超过12时,自定返回当前月份;当日超过该月最大日,则返回当前日期。 当小时大于24则返回当前小时,当分钟大于59则返回当前分钟...
DELPHI 时间加减运算
我现在有Edit1里面显示为 2007-05-22 18:22:00 另外一个Edit2里有值35 我现在想用Button1把18:22:00的分钟加上35显示在Edit12007-05-22 18:57:00里.[@more@]procedure TForm1.Button1Click(Sender: TObject); begin Edit1.Text:=DateTimeToStr(StrToDateTime(Edit1.Text)+StrtoDateTime('0:'+Edit2.Text+':0')); end; Edit2的值最大不能超过59
Delphi 子窗口置顶
delphi 7子窗口不能置母窗口后面。FORM属性设置 FORMSTYLE := fsMDIChild 即可。[@more@] DELPHI 關閉 子窗口 事件: procedure TFrm_Wip_Bom.FormClose(Sender: TObject; var Action: TCloseAction); begin Action := Cafree; //關閉時釋放窗體內存 end;{********************}procedure TFRM_BADNESS_RATE.BtnOkClick(Sender: TObject);begin // inherited; if (DBDateTimeEditEh1.Value = null or DBDateTimeEditEh2.Value = null ) then begin showmessage('日期必須輸入,請檢查!'); abort; end; Screen.