C
comboy
Unregistered / Unconfirmed
GUEST, unregistred user!
我的一个小程序里在一个form中添加,删除在dbgrid中看不见,
但看数据库却发现已经添加,删除过了,不知道是什么原因。代码
如下:unit khqk;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Db, ADODB, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, Mask;
type
Tkhqkf = class(TForm)
DBEdit1: TDBEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
Label6: TLabel;
DBEdit5: TDBEdit;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
ADOTable1: TADOTable;
DataSource1: TDataSource;
ADOTable1khxm: TStringField;
ADOTable1khsj: TStringField;
ADOTable1khgs: TStringField;
ADOTable1gsdh: TStringField;
ADOTable1khyj: TStringField;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
khqkf: Tkhqkf;
implementation
{$R *.DFM}
但看数据库却发现已经添加,删除过了,不知道是什么原因。代码
如下:unit khqk;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Db, ADODB, ExtCtrls, DBCtrls, Grids, DBGrids, StdCtrls, Mask;
type
Tkhqkf = class(TForm)
DBEdit1: TDBEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
DBEdit4: TDBEdit;
Label6: TLabel;
DBEdit5: TDBEdit;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
ADOTable1: TADOTable;
DataSource1: TDataSource;
ADOTable1khxm: TStringField;
ADOTable1khsj: TStringField;
ADOTable1khgs: TStringField;
ADOTable1gsdh: TStringField;
ADOTable1khyj: TStringField;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
khqkf: Tkhqkf;
implementation
{$R *.DFM}