主题:跪哭泪求高手帮忙看看程序的意思
unit modi;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids;
type
TFrmomc = class(TForm)
omcl_pm: TADOConnection;
ADODataSet1: TADODataSet;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
ADOCommand1: TADOCommand;
ADODataSet2: TADODataSet;
DataSource2: TDataSource;
DBGrid2: TDBGrid;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frmomc: TFrmomc;
implementation
{$R *.dfm}
procedure TFrmomc.FormCreate(Sender: TObject);
var yy:string;
var qq:string;
var dd:string;
var aa:integer;
begin
yy:=datetimetostr(now);
qq:=copy(yy,12,2);
dd:=copy(yy,1,10);
aa:=strtoint(qq);
aa:=aa-1;
qq:=inttostr(aa);
qq:=dd+' '+qq+':00';
with ADOCommand1 do begin
CommandText := 'update cell_statistics set shuliang=shuliang/2.5'
+' where time_id=(select datetime_id from bss_datetimes where date_and_time=(:ss))';
CommandType := cmdText;
Parameters.ParamByName('ss').Value:=qq;
Execute
end;
end;
end.
朋友的一个程序我看不懂,大体的意思是连接一个数据库连接程序后对数据库进行shuliang的修改,请高手帮忙看下,注明程序行的含义,方便的话与我联系251040545,非常感谢
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, Grids, DBGrids;
type
TFrmomc = class(TForm)
omcl_pm: TADOConnection;
ADODataSet1: TADODataSet;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
ADOCommand1: TADOCommand;
ADODataSet2: TADODataSet;
DataSource2: TDataSource;
DBGrid2: TDBGrid;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Frmomc: TFrmomc;
implementation
{$R *.dfm}
procedure TFrmomc.FormCreate(Sender: TObject);
var yy:string;
var qq:string;
var dd:string;
var aa:integer;
begin
yy:=datetimetostr(now);
qq:=copy(yy,12,2);
dd:=copy(yy,1,10);
aa:=strtoint(qq);
aa:=aa-1;
qq:=inttostr(aa);
qq:=dd+' '+qq+':00';
with ADOCommand1 do begin
CommandText := 'update cell_statistics set shuliang=shuliang/2.5'
+' where time_id=(select datetime_id from bss_datetimes where date_and_time=(:ss))';
CommandType := cmdText;
Parameters.ParamByName('ss').Value:=qq;
Execute
end;
end;
end.
朋友的一个程序我看不懂,大体的意思是连接一个数据库连接程序后对数据库进行shuliang的修改,请高手帮忙看下,注明程序行的含义,方便的话与我联系251040545,非常感谢