by AlexZencovich » Wed Oct 04, 2006 10:45 am
Hm, I think problem there
FConnection := TSQLConnection.Create(Self);
TSQLCOnnection(FConnection).DriverName := root.getAttribute('Connection');
TSQLCOnnection(FConnection).ConnectionName := root.getAttribute('Connection');
// here should be something like
TSQLCOnnection(FConnection).UserName := root.getAttribute('UserName');
// here should be something like
TSQLCOnnection(FConnection).Password := root.getAttribute('Password');
try
TSQLCOnnection(FConnection).VendorLib := GetProfileString(TSQLCOnnection(FConnection).DriverName, VENDORLIB_KEY, GetDriverRegistryFile);
TSQLCOnnection(FConnection).LibraryName := GetProfileString(TSQLCOnnection(FConnection).DriverName, DLLLIB_KEY, GetDriverRegistryFile);
TSQLCOnnection(FConnection).GetDriverFunc := GetProfileString(TSQLCOnnection(FConnection).DriverName, GETDRIVERFUNC_KEY, GetDriverRegistryFile);
TSQLCOnnection(FConnection).LoadParamsFromIniFile(GetDriverRegistryFile);
except
DatabaseErrorFmt(SDriverNotInConfigFile, [TSQLCOnnection(FConnection).ConnectionName, GetDriverRegistryFile]);
raise;
end;
FDataSet := TSQLQuery.Create(Self);
TSQLQuery(FDataSet).SQLConnection := TSQLConnection(FConnection);
TSQLQuery(FDataSet).SQL.Clear;
s := root.getAttribute('SQL');
TSQLQuery(FDataSet).SQL.Add(s);
try
TSQLQuery(FDataSet).Open;
except
Windows.MessageBox(Handle,PChar('Invalid query statement ''' + s + ''''),PChar('dbExpress(SQL) database error'),MB_OK+MB_ICONERROR);
raise;
end;
I have created that application for demo purposes so I never check for passwords.
Best regards,
Alex Zencovich
-------------------------------------------------------------------------------------------------------------------------------------------
www.pivotcube.com - OLAP solution for Delphi, C++ Builder and ActiveX environment