Changing server and database location on runtime 
Author Message
 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



Mon, 29 Aug 2005 17:53:21 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Changing the location of the Server/Database at Runtime

2. Changing the Database location at runtime for a report using OLE DB

3. Changing Crystal Report database location at runtime

4. How to change database location at runtime

5. changing db location in ODBC for Crystal Report at runtime

6. Change subreport DB location at runtime using PE

7. 1 * NcLpKzist-Changing Location of Field Definition File (TTX) at Runtime

8. Changing Location of Field Definition File (TTX) at Runtime

9. changing db location in ODBC for Crystal Report at runtime

10. setting adodc database location runtime

11. Setting database location at runtime

12. Setting Crystal Report Database Location at RunTime...

 

 
Powered by phpBB® Forum Software