procedure TIWUserSession.IWUserSessionBaseCreate(Sender: TObject);
var
myf:Tinifile;
s,qx,Source,Catalog,supername,password:string;
ADatetime:TDateTime;
//該日期從sql中獲得
ASysTime:TSystemTime;
begin
//Provider=SQLOLEDB.1;Password=329;Persist Security Info=True;User ID=sa;Initial Catalog=SDmis;Data Source=qkrs
cnn.Connected:=false;
myf:=TIniFile.Create(ExtractFilePath(Paramstr(0)) +INI_FILE);
Source:=myf.ReadString('conn','Source','');
Catalog:=myf.ReadString('conn','Catalog','');
supername:=myf.ReadString('conn','supername','');
password:=myf.ReadString('conn','password','');
cnn.ConnectionString :='Provider=SQLOLEDB.1;Password='+password+';Persist Security Info=True;User ID='+supername+';Initial Catalog='+Catalog+';Data Source='+source;
cnn.Connected:=true;
end;
这是数据模块!