SQL Connection Issues

Discussion forum for PivotCube VCL users. Common questions. Bug and problem reports

Moderator: Alex Zencovich

SQL Connection Issues

Postby darry » Wed Oct 04, 2006 8:38 am

Hi Alex,

When I load the configuration XML(Build-->Load Structure), the OLAP viewers required me to input the password (it could prompt the proper user id defined in the xml)

I checked the password has already saved in the XML configuration.

How I could I bypass the password entry since I do not let our end user know our SQL user id and password(even they are stored in XML configuration) ?

Please help me to solve it.

Thanks
darry
Guest
 
Posts: 2
Joined: Wed Oct 04, 2006 8:25 am

Postby darry » Wed Oct 04, 2006 9:04 am

Hi Alex,

Forget to inform you that I am using SQL connection instead of ODBC.

Thanks

Darry
darry
Guest
 
Posts: 2
Joined: Wed Oct 04, 2006 8:25 am

Postby 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
AlexZencovich
Site Admin
 
Posts: 580
Joined: Sun Jun 18, 2006 10:09 am


Return to PivotCube VCL

Who is online

Users browsing this forum: No registered users and 8 guests

cron