
Changing server and database location on runtime
Hi !
I'm using
Crystal Reports with my C++ application
Application is destined to many clients so I need
to create reports which work properly on both types
of MS SQL Server authentication (mixed and windows).
I noticed that.......
When I create tables on report which use OLE DB conncection:
1) Windows authentication :
spReport->Database->Tables->Item[i]->SetLogOnInfo(serverName,dbName,L"<<Use
Integrated Security>>",L"");
works fine
2) Mixed authentication:
user = "sa"
pass = "robocze"
spReport->Database->Tables->Item[i]->SetLogOnInfo(serverName,dbName,user,pas
s);
MessageBox: Server Has Not Yet Been Opened
message in SQLSERVER profiler :
Login failed for user 'SQLSERVER\tworek'.
^^^^^^^^ (my windows
authentication user name !)
So do always OLE DB in Crystal Reports uses windows authentication ????
When I create tables on report which use native SQL Server conncection:
1) Windows authentication
spReport->Database->Tables->Item[i]->SetLogOnInfo(serverName,dbName,L"<<Use
Integrated Security>>",L"");
SQL Server profiler:
Login failed for user '<<Use Integrated Security>>'. Reason: Not associated
with a trusted SQL Server connection.
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Is it possible to pass to Logon information, that I want to use windows
authentication ???
2) Mixed authentication
works fine.
So is it true that ole db always tries to use windows authentication
and native connection always tries to use mixed authentication ?
But I don't want to create reports that work fine only in one authentication
type. I MUST have a solution which works properly for both types.
Could anybody help me ?
best regards
Piotr