Crystal 8.5
Integration method: RDC component(CRAXDRT)
Visual Basic 6
My VB app attempts to open reports at runtime passing through selection criteria built from information from another application.
The reports were built using an ODBC connection, and i was opening them from VB into a Crystal Viewer using the LogonServer method:
crystalRpt.Database.LogOnServer "p2sodbc.dll",DSN,,UID,PWD
Which explicitly uses ODBC. I would like to use OLEDB as my connection method for a number of reasons but am encountering problems and fear that my code is incomplete:
Public crystalRpt As CRAXDRT.Report
Public crystalApp As CRAXDRT.Application
Set crystalApp = New CRAXDRT.Application
Set crystalRpt = crystalApp.OpenReport('my report')
For l_intCount = 1 To crystalRpt.Database.Tables.Count
crystalRpt.Database.Tables(l_intCount).SetLogOnInfo DSN, ,UID,PWD
Next l_intCount
I have been into my reports and used 'set location' to change the data source to use OLE DB .. however when this code runs, it still attempts to connect via ODBC.
LogonServer allows explicit declaration of the dll, what do i need to do to tell Setlogoninfo to use OLE DB at runtime?
Thanks in advance.
Integration method: RDC component(CRAXDRT)
Visual Basic 6
My VB app attempts to open reports at runtime passing through selection criteria built from information from another application.
The reports were built using an ODBC connection, and i was opening them from VB into a Crystal Viewer using the LogonServer method:
crystalRpt.Database.LogOnServer "p2sodbc.dll",DSN,,UID,PWD
Which explicitly uses ODBC. I would like to use OLEDB as my connection method for a number of reasons but am encountering problems and fear that my code is incomplete:
Public crystalRpt As CRAXDRT.Report
Public crystalApp As CRAXDRT.Application
Set crystalApp = New CRAXDRT.Application
Set crystalRpt = crystalApp.OpenReport('my report')
For l_intCount = 1 To crystalRpt.Database.Tables.Count
crystalRpt.Database.Tables(l_intCount).SetLogOnInfo DSN, ,UID,PWD
Next l_intCount
I have been into my reports and used 'set location' to change the data source to use OLE DB .. however when this code runs, it still attempts to connect via ODBC.
LogonServer allows explicit declaration of the dll, what do i need to do to tell Setlogoninfo to use OLE DB at runtime?
Thanks in advance.