Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

ApplyLogOnInfo, reverts back (Crystal Reports 2008)

Crystal Reports 2008 ver.

Visual studio 2005 (vb)

SQL2005z & Oracle (db)

The problem is that when the following line is executed, the database name and all information reverts back to the original information (database name,etc) . (when i try to change connection SQL to Oracle db, and Oracle to SQL).



Dim crTableLogOnInfo As New TableLogOnInfo

Dim crConnectionInfo As CrystalDecisions.Shared.ConnectionInfo = New



With crConnectionInfo

Select Case intProvider

Case databaseProvider.sqlServer

.ServerName = "server"

.DatabaseName = "DB"

.UserID = "sa"

.Password = ""

Case databaseProvider.Oracle



'setup the attributes for the connection

dbAttributes.Collection.Set("Server", "ORCL")

dbAttributes.Collection.Set("Trusted_Connection", False)

.ServerName = "ORCL"

.DatabaseName = ""

.UserID = "us"

.Password = "pwd"

.Attributes.Collection.Set("Database DLL", "crdb_oracle.dll")

.Attributes.Collection.Set("QE_DatabaseName", "")

'.Attributes.Collection.Set("QE_DatabaseType", "Servidor de Oracle")

.Attributes.Collection.Set("QE_SQLDB", True)

.Attributes.Collection.Set("SSO Enabled", False)

.Attributes.Collection.Set("QE_LogonProperties", dbAttributes)

.LogonProperties = dbAttributes.Collection

.Type = CrystalDecisions.Shared.ConnectionInfoType.CRQE

End Select

End With



*For Each crTable In crTables

crTableLogOnInfo = crTable.LogOnInfo

crTableLogOnInfo.ConnectionInfo = crConnectionInfo



Don't return error, ApplyLogOnInfo.


Not what you were looking for? View more on this topic or Ask a question