在dataconnection下面的代码如下:
procedure TData.DataModuleCreate(Sender: TObject);
var    ini:tIniFile;
       strserver,strname,strpassword:string;
begin
ini:=tinifile.Create(extractfilepath(paramstr(0))+'\cserver.ini');
strserver:=ini.ReadString('server','server','server');
strname:=ini.ReadString('name','name','sa');
strpassword:=ini.ReadString('password','password','');
try
adoconnection1.ConnectionString:='Provider=SQLOLEDB.1;Persist Security Info=False;User ID='+strname+';Initial Catalog=studten;Data Source='+strserver+';password='+strpassword;
adoconnection1.Connected:=true;
except
exit;
end;
end; 
在程序窗口的代码procedure TForm1.FormCreate(Sender: TObject);
begin
   adoquery1.Connection:=data.ADOConnection1;
   adoquery1.Active:=true;
   adoquery1.Close;
   adoquery1.SQL.Clear;
   adoquery1.SQL.Add('select * form t_writes');
   adoquery1.Open;
end;
但每次运行的时间都会提示出错,
Project P1.exe raised exception class, EAccessVonlation with message' access violation at address 004A94F2 in moule p1.exe '. read of address 00000058.我是菜鸟,刚学不久,请赐教!是什么原因!