What I am trying to do is change a VB6/SQL program to use windows authentication. Everything works fine except the Crystal reports. I went into each report and changed my connections from DSN to Windows Authentication. I selected the server and the database.
The reports looks fine and displays fine in Crystal.
The I tested the reports in my VB6 program. I changed the associated variables to now use windows authentication.
When I tested the reports, they WORKED.
But then if I alter the report in any way, something happens and I get a "Logon Failed"
This is all happening on the same machine.
Why did it work the first time when I Initially changed to the windows authentication but then stops once any change is done to the report?
Let me know what other informatopn you may need.
Here is the original DSN Login (Commented out) and the new Windows Authentication login
For Each crxDataTable In crxReport.Database.Tables
' crxDataTable.SetLogOnInfo gbServer, gbDatabase, gbUserID, gbPW
crxDataTable.SetLogOnInfo gbDataServer, gbDatabase, "<<Use Integrated Security>>", vbNullString
I = InStr(crxDataTable.Location, ".")
If I = 0 Then
crxDataTable.Location = gbDatabase & ".dbo." & crxDataTable.Location
crxDataTable.Location = gbDatabase & Mid$(crxDataTable.Location, I)
If Not crxDataTable.TestConnectivity Then
sMsg = "Unable to connect to database."
Set crxReport = Nothing
Set crxApp = Nothing