|
-
Feb 27th, 2008, 11:51 AM
#1
Thread Starter
New Member
Providing database logon credentials to CrystalReports XI thru VB6.0
I am trying to provide database logon credentials to Crystal Reports XI thru VB 6.0 (via ODBC) for Oracle 10g server database.
I have Oracle client 9.2.0.4.0 on my PC.
I am using the LogOnServer method in VB to log on to the database providing a secure connection to all tables within the database. Logon sever syntax is
LogOnServer <databaseDLL>, <Server>, <Database>, <UserID>, <Password>
where <Server> is the ODBC Data Source Name and <database> is the name of the database
How do I find the <databaseDLL> to use in my code?
Thanks,
-
Feb 27th, 2008, 03:48 PM
#2
Addicted Member
Re: Providing database logon credentials to CrystalReports XI thru VB6.0
If i recall correctly the dll specified should be "crdb_odbc.dll" for ODBC connections. Try it out.
-
Feb 28th, 2008, 09:03 AM
#3
Thread Starter
New Member
Re: Providing database logon credentials to CrystalReports XI thru VB6.0
I found the solution to this problem. This code is working fine. (using the LogOnServer method and crdb_oracle.dll and crdb_odbc.dll)
Thanks,
Saloni
Option Explicit
Dim App As New CRAXDRT.Application
Dim rptReport As New CRAXDRT.Report
Private Sub Form_Load()
Dim sReportName As String
sReportName = GetReportName(gintReports)
PopulateReport sReportName
End Sub
Private Sub Form_Resize()
CrystalActiveXReportViewer1.Top = 0
CrystalActiveXReportViewer1.Left = 0
CrystalActiveXReportViewer1.Height = ScaleHeight
CrystalActiveXReportViewer1.Width = ScaleWidth
End Sub
Private Sub PopulateReport(sReportName As String)
Screen.MousePointer = vbHourglass
App.LogOnServer "crdb_oracle.dll", gstrDatabaseName, "", gstrUserName, gstrPassword
Set rptReport = App.OpenReport(gstrReportPath & sReportName)
rptReport.Database.LogOnServer "crdb_odbc.dll", gstrDatabaseName, "", gstrUserName, gstrPassword
CrystalActiveXReportViewer1.Refresh
CrystalActiveXReportViewer1.ReportSource = rptReport
CrystalActiveXReportViewer1.ViewReport
Screen.MousePointer = vbDefault
Exit Sub
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|