T
thtx5
Unregistered / Unconfirmed
GUEST, unregistred user!
请把它转换成BC++的代码,谢谢
怎样创建OLE对象------------------------------------------------
implementation
uses ComObj;
{$R *.DFM}
var
V,b: OleVariant;
procedure TForm1.FormCreate(Sender: TObject);
begin
V:=CreateOleObject('ADODB.Connection');
V.Open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C://sy新建文件夹//NwsJcsj.mdb;Persist Security Info=False');
b:=CreateOleObject('ADODB.Recordset');
b.ActiveConnection:=V;
b.Open('select * from GZLK');
//b.MoveFrist;
Form1.Caption:=b.Fields['GZLDM'].Value;
end;
怎样创建OLE对象------------------------------------------------
implementation
uses ComObj;
{$R *.DFM}
var
V,b: OleVariant;
procedure TForm1.FormCreate(Sender: TObject);
begin
V:=CreateOleObject('ADODB.Connection');
V.Open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C://sy新建文件夹//NwsJcsj.mdb;Persist Security Info=False');
b:=CreateOleObject('ADODB.Recordset');
b.ActiveConnection:=V;
b.Open('select * from GZLK');
//b.MoveFrist;
Form1.Caption:=b.Fields['GZLDM'].Value;
end;