这段程序出错是怎么回事?
jbzj 2003-07-09 07:58:16 unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls,comobj, DB, ADODB;
type
TForm1 = class(TForm)
ListBox1: TListBox;
Button1: TButton;
ADOConnection1: TADOConnection;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
mycn:variant;
myrs:variant;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
var
myconnstr:string;
begin
mycn:=CreateoleObject('adodb.connection');
myrs:=createoleobject('adodb.recordsetr');
myconnstr:='Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=STUDENTS1.mdb;Persist Security Info=False ';
mycn.open(myconnstr);
myrs.open('select * from 成绩单 where 语文 >60',mycn);
end;
end.
上面的程序编译无错,运行时出错,什么原因?