我看你还是用INI文件读取吧.我给你一个连接方式.:
http://www.delphibbs.com/keylife/iblog_comment.asp?xid=26957
//连接access,我的数据库为csmis.mdb
procedure Tcs_yh_login.FormActivate(Sender: TObject);
var lj:string;
sql:string;
begin
lj:=ExtractFilePath(Application.ExeName);
sql:='Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;'+
'Data Source='+lj+'csmis.mdb;Mode=Share Deny None;'+
'Extended Properties="";Persist Security Info=False;'+
'Jet OLEDB:System database="";Jet OLEDB:Registry Path="";'+
'Jet OLEDB
atabase Password="";Jet OLEDB:Engine Type=5;'+
'Jet OLEDB
atabase Locking Mode=1;'+
'Jet OLEDB:Global Partial Bulk Ops=2;'+
'Jet OLEDB:Global Bulk Transactions=1;'+
'Jet OLEDB:New Database Password="";'+
'Jet OLEDB:Create System Database=False;'+
'Jet OLEDB:Encrypt Database=False;'+
// 'Jet OLEDB
on"'+'t Copy Locale on Compact=False;'+
'Jet OLEDB:Compact Without Replica Repair=False;'+
'Jet OLEDB:SFP=False';
cs_data.csconnect.connectionstring:=sql;
cs_data.csconnect.connected:=false;
cs_data.csconnect.connected:=true;
end;