Y
yubing8
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ComCtrls, DB, ADODB,inifiles,StrUtils;
type
Tdbfthread=class(tthread)
private
protected
procedure execute;override;
public
end;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Tdbfthread.Create(false);
end;
{ Tdbfthread }
procedure Tdbfthread.execute;
var
myado:tadoquery;
begin
myado:=tadoquery.Create(nil);
myado.ConnectionString:='Provider=SQLOLEDB.1;Password=123456;Persist Security Info=True;User ID=sa;Initial Catalog=teach;'+
'Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AOP-YB;Use Encryption for Data=False;Tag with column collation when possible=False';
myado.SQL.Clear;
myado.SQL.Text:='CREATE TABLE bbb (ID char(8),PASSWD char(15),AUTHORITY char(1))';
myado.ExecSQL;
myado.Free;
end;
end.
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ComCtrls, DB, ADODB,inifiles,StrUtils;
type
Tdbfthread=class(tthread)
private
protected
procedure execute;override;
public
end;
type
TForm1 = class(TForm)
Button1: TButton;
Edit1: TEdit;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Tdbfthread.Create(false);
end;
{ Tdbfthread }
procedure Tdbfthread.execute;
var
myado:tadoquery;
begin
myado:=tadoquery.Create(nil);
myado.ConnectionString:='Provider=SQLOLEDB.1;Password=123456;Persist Security Info=True;User ID=sa;Initial Catalog=teach;'+
'Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=AOP-YB;Use Encryption for Data=False;Tag with column collation when possible=False';
myado.SQL.Clear;
myado.SQL.Text:='CREATE TABLE bbb (ID char(8),PASSWD char(15),AUTHORITY char(1))';
myado.ExecSQL;
myado.Free;
end;
end.