TField.CurValue Property Represents the current value of the field component including changes made by other users of the database Description Use CurValue to examine the value of a field when a problem occurs while posting a value to the database us…
ClientDataSet1.CommandText := sSQL; ClientDataSet1.Params.Clear; ClientDataSet1.CommandText :='SELECT * FROM test WHERE ID=:TID and Code=:Code '; //传参后面加一个空格 ClientDataSet1.Params.ParamByName(; ClientDataSet1.Params.ParamByName('; //每个":Code &quo…
self.ADOQuery2.Edit;self.ADOQuery2.First;while not self.ADOQuery2.Eof dobeginself.ADOQuery2.FieldByName('单价').Value:=roundto(self.ADOQuery2.FieldByName('单价').Value,-2);self.ADOQuery2.Next;end;self.ADOQuery2.Post;这是显示在一个DBGrid里面我是想把单价保留2位小数,但是老出现这个问题,…
unit uJSONDB; interface uses SysUtils, Classes, Variants, DB, DBClient, SuperObject, Dialogs; type TJSONDB = class private class function getJsonFieldNames(res: ISuperObject):TStringList ; class function getJsonFieldValues(res: ISuperObject):TStringL…
针对返回结果为参数的 一. 先建立自己的存储过程 ALTER PROCEDURE [dbo].[REName] ) AS BEGIN select ROW_NUMBER() over(order by Name asc) as [序号], Name,Gender,Birthday,Mobile,Tel,Ctfld from dbo.name where Gender = @Gender OR @Gender IN ( NULL, '', '-1' ) END 二.打开delphi,先添加几个控件…
delphi cxgrid 使用方法1.绑定数据 方法 cxGrid1DBTableView1.DataController.DataSource:=DataSource12.去掉"Drag a column header here to group by that column"方法cxGrid1DBTableView1.OptionsView.GroupByBox置为False3.去掉表头下三角数据 方法cxGrid1DBTableView1.O…
Delphi的table的RecNum属性,可以用来定位记录,如:self.Table1.RecNum:=23;即可以让数据库记录移动到23号记录上,但这种作用仅限于Paradox数据库,而不是dBASE数据库.如何解决这个问题,可以如下处理: unit DBTables; ... procedure TBDEDataSet.SetRecNo(Value: Integer); begin CheckBrowseMode; if (FRecNoStatus = rnParadox) and (Va…
1. CxGrid汇总功能 ① OptionsView-Footer设置为True,显示页脚 ② CxGrid的Summary选项卡定义要汇总的列和字段名及汇总方式,Footer选项卡定义单个汇总,Default For Groups定义按组汇总.OptionsView-GroupFooters设置为gfAlwaysVisible则显示按组汇总.设置后界面如图. 2. CxGrid的样式设置 当设置了Kind时,NativeStyle必须设置为False,如果指定了Ski…