?? unit14.pas
字號:
unit Unit14;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, DB, ADODB;
type
TForm14 = class(TForm)
Panel1: TPanel;
GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
GroupBox3: TGroupBox;
jl: TMemo;
cf: TMemo;
Label1: TLabel;
xm: TLabel;
ee: TLabel;
xb: TLabel;
Label2: TLabel;
ADOQuery3: TADOQuery;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form14: TForm14;
data_path,data_path1:string;
sqlstring:string;
implementation
uses Unit1;
{$R *.dfm}
procedure TForm14.FormCreate(Sender: TObject);
begin
data_path1:=application.GetNamePath+'user/'+form1.user+'/'+form1.bj+'.mdb';
adoquery3.connectionstring:='Provider=Microsoft.Jet.OLEDB.4.0;Data Source='+data_path1+';';
sqlstring:='select * from 獎勵表 where 學號=:xh';
with adoquery3 do
begin
close;
sql.Clear;
sql.Add(sqlstring);
Parameters.ParamByName('xh').Value:=form1.xh;
open;
first;
while not eof do
begin
form14.jl.Lines.Add(fieldbyname('內容').AsString+' 學期:'+fieldbyname('學期').AsString);
next;
end;
end;
sqlstring:='select * from 懲罰表 where 學號=:xh';
with adoquery3 do
begin
close;
sql.Clear;
sql.Add(sqlstring);
Parameters.ParamByName('xh').Value:=form1.xh;
open;
first;
while not eof do
begin
form14.cf.Lines.Add(fieldbyname('內容').AsString+' 學期:'+fieldbyname('學期').AsString);
next;
end;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -