- 1
- 0
- 约5.34千字
- 约 4页
- 2017-08-16 发布于浙江
- 举报
DBGridEh导出功能详解
DBGridEh导出功能详解(SaveDBGridEhToExportFile说明)经常有用户要求数据导出,对此,我们一直用最原始的办法,打开查询,读取每个字段的数据,逐条的的写入文件。如下:procedure TForm10.prExpData(pMode:Byte);VarpFPath:String;pFName:String;?? //Exp Name of prefixpFObject:string;pMyFile:TextFile;pStr:string;i:integer;begin??????? pFObject:=c:\Exp_Sample.csv;??????? AssignFile(pMyFile,pFObject);??????? ReWrite(pMyFile);??????? with DM.QR_ENJBTR_250 do begin??????????? CLOSE;??????????? open;??????????? //写入标题??????????? for i:=0 to DM.QR_ENJBTR_250.FieldCount-1 do begin??????????????? pStr:=pStr+DM.QR_ENJBTR_250.FieldDefs.Items[i].Name+,;??????????? end;??????????? W
原创力文档

文档评论(0)