unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, ADODB;type
TForm1 = class(TForm)
ADOConnection1: TADOConnection;
ADOTable1: TADOTable;
procedure FormCreate(Sender: TObject);
private
procedure pass; { Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;
lINK:string;
implementation{$R *.dfm}
uses unit2;
procedure TForm1.FormCreate(Sender: TObject);begin
link:='Provider=MSQLOLEDB.1;Integrated Security=SSPI;'+
'Data Source=FS-DJICNSZBVJJ3;Persist Security Info=False;'+
'Initial Catalog=data' ;
//ADOConnection1.ConnectionString:=link;
pass;
end;procedure Tform1.pass ;
var
ps:string;
begin
Form2:=Tform2.Create(self); //FORM2是登录窗口
ps:=form2.Edit1.Text;
ADOConnection1.ConnectionString:=link;
ADOTable1.Connection:=ADOConnection1;
AdoTable1.TableName:='pass' ;//PASS是表名
AdoTable1.Open;
AdoTable1.First;
if ps<>AdoTable1.FieldByName('password').AsString then
begin
exit;
end;
form2.Free;
ADOTable1.Close;
end;
end.我每一次运行,提示:'未找到提供程序,该程序可能未正确安装',请问这是何解,我想了很长时间,还没想出,这是什么原因?
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, ADODB;type
TForm1 = class(TForm)
ADOConnection1: TADOConnection;
ADOTable1: TADOTable;
procedure FormCreate(Sender: TObject);
private
procedure pass; { Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;
lINK:string;
implementation{$R *.dfm}
uses unit2;
procedure TForm1.FormCreate(Sender: TObject);begin
link:='Provider=MSQLOLEDB.1;Integrated Security=SSPI;'+
'Data Source=FS-DJICNSZBVJJ3;Persist Security Info=False;'+
'Initial Catalog=data' ;
//ADOConnection1.ConnectionString:=link;
pass;
end;procedure Tform1.pass ;
var
ps:string;
begin
Form2:=Tform2.Create(self); //FORM2是登录窗口
ps:=form2.Edit1.Text;
ADOConnection1.ConnectionString:=link;
ADOTable1.Connection:=ADOConnection1;
AdoTable1.TableName:='pass' ;//PASS是表名
AdoTable1.Open;
AdoTable1.First;
if ps<>AdoTable1.FieldByName('password').AsString then
begin
exit;
end;
form2.Free;
ADOTable1.Close;
end;
end.我每一次运行,提示:'未找到提供程序,该程序可能未正确安装',请问这是何解,我想了很长时间,还没想出,这是什么原因?
应该是提示MSQLOLEDB.1接口没找到