📄 winform.pas.~1~
字号:
//
// bdpInsertCommand1
//
Self.bdpInsertCommand1.CommandOptions := nil;
Self.bdpInsertCommand1.CommandText := 'INSERT INTO dbo.Class (ID, DepID, Subject ) VALUES ( ?, ?, ?)';
Self.bdpInsertCommand1.CommandType := System.Data.CommandType.Text;
Self.bdpInsertCommand1.Connection := Self.BdpConnection1;
Self.bdpInsertCommand1.ParameterCount := (SmallInt(3));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('ID',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
6, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('DepID',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
2, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'DepID', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('Subject',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Subject', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand1.SchemaName := nil;
Self.bdpInsertCommand1.Transaction := nil;
Self.bdpInsertCommand1.UpdatedRowSource := System.Data.UpdateRowSource.None;
//
// bdpSelectCommand1
//
Self.bdpSelectCommand1.CommandOptions := nil;
Self.bdpSelectCommand1.CommandText := 'SELECT * FROM dbo.Class';
Self.bdpSelectCommand1.CommandType := System.Data.CommandType.Text;
Self.bdpSelectCommand1.Connection := Self.BdpConnection1;
Self.bdpSelectCommand1.ParameterCount := (SmallInt(0));
Self.bdpSelectCommand1.SchemaName := nil;
Self.bdpSelectCommand1.Transaction := nil;
Self.bdpSelectCommand1.UpdatedRowSource := System.Data.UpdateRowSource.None;
//
// bdpUpdateCommand1
//
Self.bdpUpdateCommand1.CommandOptions := nil;
Self.bdpUpdateCommand1.CommandText := 'UPDATE dbo.Class SET ID = ?, DepID = ?, Subject = ? WHERE ID = ? AND DepID = ? '+
'AND Subject = ?';
Self.bdpUpdateCommand1.CommandType := System.Data.CommandType.Text;
Self.bdpUpdateCommand1.Connection := Self.BdpConnection1;
Self.bdpUpdateCommand1.ParameterCount := (SmallInt(6));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('ID',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
6, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Current,
nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('DepID',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
2, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'DepID', System.Data.DataRowVersion.Current,
nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('Subject',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Subject', System.Data.DataRowVersion.Current,
nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('IDOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
6, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Original,
nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('DepIDOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
2, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'DepID', System.Data.DataRowVersion.Original,
nil));
Self.bdpUpdateCommand1.Parameters.Add(Borland.Data.Common.BdpParameter.Create('SubjectOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Subject', System.Data.DataRowVersion.Original,
nil));
Self.bdpUpdateCommand1.SchemaName := nil;
Self.bdpUpdateCommand1.Transaction := nil;
Self.bdpUpdateCommand1.UpdatedRowSource := System.Data.UpdateRowSource.None;
//
// daDep
//
Self.daDep.Active := False;
Self.daDep.DataSet := nil;
Self.daDep.DataTable := nil;
Self.daDep.DeleteCommand := Self.bdpDeleteCommand2;
Self.daDep.InsertCommand := Self.bdpInsertCommand2;
Self.daDep.SelectCommand := Self.bdpSelectCommand2;
Self.daDep.StartRecord := 0;
Self.daDep.UpdateCommand := Self.bdpUpdateCommand2;
//
// bdpDeleteCommand2
//
Self.bdpDeleteCommand2.CommandOptions := nil;
Self.bdpDeleteCommand2.CommandText := 'DELETE FROM dbo.Department WHERE ID = ? AND Name = ?';
Self.bdpDeleteCommand2.CommandType := System.Data.CommandType.Text;
Self.bdpDeleteCommand2.Connection := Self.BdpConnection1;
Self.bdpDeleteCommand2.ParameterCount := (SmallInt(2));
Self.bdpDeleteCommand2.Parameters.Add(Borland.Data.Common.BdpParameter.Create('IDOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
2, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Original,
nil));
Self.bdpDeleteCommand2.Parameters.Add(Borland.Data.Common.BdpParameter.Create('NameOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Name', System.Data.DataRowVersion.Original,
nil));
Self.bdpDeleteCommand2.SchemaName := nil;
Self.bdpDeleteCommand2.Transaction := nil;
Self.bdpDeleteCommand2.UpdatedRowSource := System.Data.UpdateRowSource.None;
//
// bdpInsertCommand2
//
Self.bdpInsertCommand2.CommandOptions := nil;
Self.bdpInsertCommand2.CommandText := 'INSERT INTO dbo.Department (ID, Name ) VALUES ( ?, ?)';
Self.bdpInsertCommand2.CommandType := System.Data.CommandType.Text;
Self.bdpInsertCommand2.Connection := Self.BdpConnection1;
Self.bdpInsertCommand2.ParameterCount := (SmallInt(2));
Self.bdpInsertCommand2.Parameters.Add(Borland.Data.Common.BdpParameter.Create('ID',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
2, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand2.Parameters.Add(Borland.Data.Common.BdpParameter.Create('Name',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Name', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand2.SchemaName := nil;
Self.bdpInsertCommand2.Transaction := nil;
Self.bdpInsertCommand2.UpdatedRowSource := System.Data.UpdateRowSource.None;
//
// bdpSelectCommand2
//
Self.bdpSelectCommand2.CommandOptions := nil;
Self.bdpSelectCommand2.CommandText := 'SELECT * FROM dbo.Department';
Self.bdpSelectCommand2.CommandType := System.Data.CommandType.Text;
Self.bdpSelectCommand2.Connection := Self.BdpConnection1;
Self.bdpSelectCommand2.ParameterCount := (SmallInt(0));
Self.bdpSelectCommand2.SchemaName := nil;
Self.bdpSelectCommand2.Transaction := nil;
Self.bdpSelectCommand2.UpdatedRowSource := System.Data.UpdateRowSource.None;
//
// bdpUpdateCommand2
//
Self.bdpUpdateCommand2.CommandOptions := nil;
Self.bdpUpdateCommand2.CommandText := 'UPDATE dbo.Department SET ID = ?, Name = ? WHERE ID = ? AND Name = ?';
Self.bdpUpdateCommand2.CommandType := System.Data.CommandType.Text;
Self.bdpUpdateCommand2.Connection := Self.BdpConnection1;
Self.bdpUpdateCommand2.ParameterCount := (SmallInt(4));
Self.bdpUpdateCommand2.Parameters.Add(Borland.Data.Common.BdpParameter.Create('ID',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
2, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Current,
nil));
Self.bdpUpdateCommand2.Parameters.Add(Borland.Data.Common.BdpParameter.Create('Name',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Name', System.Data.DataRowVersion.Current,
nil));
Self.bdpUpdateCommand2.Parameters.Add(Borland.Data.Common.BdpParameter.Create('IDOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
2, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Original,
nil));
Self.bdpUpdateCommand2.Parameters.Add(Borland.Data.Common.BdpParameter.Create('NameOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Name', System.Data.DataRowVersion.Original,
nil));
Self.bdpUpdateCommand2.SchemaName := nil;
Self.bdpUpdateCommand2.Transaction := nil;
Self.bdpUpdateCommand2.UpdatedRowSource := System.Data.UpdateRowSource.None;
//
// daStu
//
Self.daStu.Active := False;
Self.daStu.DataSet := nil;
Self.daStu.DataTable := nil;
Self.daStu.DeleteCommand := Self.bdpDeleteCommand3;
Self.daStu.InsertCommand := Self.bdpInsertCommand3;
Self.daStu.SelectCommand := Self.bdpSelectCommand3;
Self.daStu.StartRecord := 0;
Self.daStu.UpdateCommand := Self.bdpUpdateCommand3;
//
// bdpDeleteCommand3
//
Self.bdpDeleteCommand3.CommandOptions := nil;
Self.bdpDeleteCommand3.CommandText := 'DELETE FROM dbo.Student WHERE ID = ? AND Name = ? AND Birth = ? AND ClsID = ? A'+
'ND Dorm = ?';
Self.bdpDeleteCommand3.CommandType := System.Data.CommandType.Text;
Self.bdpDeleteCommand3.Connection := Self.BdpConnection1;
Self.bdpDeleteCommand3.ParameterCount := (SmallInt(5));
Self.bdpDeleteCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('IDOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
8, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Original,
nil));
Self.bdpDeleteCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('NameOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Name', System.Data.DataRowVersion.Original,
nil));
Self.bdpDeleteCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('BirthOriginal',
Borland.Data.Common.BdpType.DateTime, Borland.Data.Common.BdpType.Unknown,
0, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Birth', System.Data.DataRowVersion.Original,
nil));
Self.bdpDeleteCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('ClsIDOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
6, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ClsID', System.Data.DataRowVersion.Original,
nil));
Self.bdpDeleteCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('DormOriginal',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
8, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Dorm', System.Data.DataRowVersion.Original,
nil));
Self.bdpDeleteCommand3.SchemaName := nil;
Self.bdpDeleteCommand3.Transaction := nil;
Self.bdpDeleteCommand3.UpdatedRowSource := System.Data.UpdateRowSource.None;
//
// bdpInsertCommand3
//
Self.bdpInsertCommand3.CommandOptions := nil;
Self.bdpInsertCommand3.CommandText := 'INSERT INTO dbo.Student (ID, Name, Birth, ClsID, Dorm ) VALUES ( ?, ?, ?, ?, ?)';
Self.bdpInsertCommand3.CommandType := System.Data.CommandType.Text;
Self.bdpInsertCommand3.Connection := Self.BdpConnection1;
Self.bdpInsertCommand3.ParameterCount := (SmallInt(5));
Self.bdpInsertCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('ID',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
8, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ID', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('Name',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
20, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Name', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('Birth',
Borland.Data.Common.BdpType.DateTime, Borland.Data.Common.BdpType.Unknown,
0, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Birth', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('ClsID',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
6, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'ClsID', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand3.Parameters.Add(Borland.Data.Common.BdpParameter.Create('Dorm',
Borland.Data.Common.BdpType.&String, Borland.Data.Common.BdpType.stFixed,
8, System.Data.ParameterDirection.Input, False,
(Byte(0)), (Byte(0)), 0, 'Dorm', System.Data.DataRowVersion.Current,
nil));
Self.bdpInsertCommand3.SchemaName := nil;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -