password problem with crystalreports and sql database

de_swa
02-05-2004, 08:14 AM
hi all

my reports are working correctly and so is my connection with my oracle database

but if this code is executed:
viewer.ReportSource() = myReport
i still get a login screen where i have to fill in my password

this is my code:
Dim myDBConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo()

With myDBConnectionInfo
.ServerName = "zz"
.DatabaseName = ""
.UserID() = "yy"
.Password = "xx"
End With

Dim myTableLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo()

Dim myReport As New rapportmedewerkers2()

Dim mydatabase As CrystalDecisions.CrystalReports.Engine.Database

mydatabase = myReport.Database
Dim myTables As CrystalDecisions.CrystalReports.Engine.Tables
myTables = mydatabase.Tables

Dim myTable As CrystalDecisions.CrystalReports.Engine.Table

For Each myTable In myTables
myTableLogonInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myDBConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next

vwMedewerker.ReportSource() = myReport
End Sub

if i run this form, i'll get a login screen with
ServerName = zz
DatabaseName empty (but it is not needed)
UserID = yy

but the Password field stays emty

anyone who knows why???

MKoslof
02-09-2004, 09:47 AM
Are you positive that you are passing in the correct password? At run-time you need to pass in the server, id, and pw of the DB. If the password string being passed via code is correct, you shouldn't be prompted. If you do not provide a password via your code, at run-time you will be prompted.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum