[RESOLVED] Runtime-time Error '20535'
Hi everyone!
I hope someone will help me on this.
I'm using VB6, Crystal Report 8.5 , Microsoft Access 2003 and my OS is WinXP. I enable password for the database
I'm really new with VB and really really hope that someone will give me the solution for my problem. I recieved this "Run-time error '20535:
Error in File C:\Program Files\Microsoft Visual Studio\....\Outward1.rpt:
Unable to connect: incorrect session parameters"
here is some of the codes:
on the 'view' command button:
Code:
Private Sub cmdView_Click()
mnuView_Click
End Sub
for the mnuView_click :
Code:
Private Sub mnuView_Click()
CrystalReport1.Destination = crptToWindow
CrystalReport1.DataFiles(0) = App.Path & "\dbCustomer.mdb"
CrystalReport1.ReportFileName = App.Path & "\Outward1.rpt"
CrystalReport1.CopiesToPrinter = 1
CrystalReport1.Password = "customerdatabase2006"
CrystalReport1.WindowTitle = "Customer Management V1.0"
CrystalReport1.WindowState = crptMaximized
CrystalReport1.Action = 1
End Sub
Thank you in advance!!!
Re: Runtime-time Error '20535'
try..
Code:
Private Sub mnuView_Click()
CrystalReport1.Destination = crptToWindow
CrystalReport1.DataFiles(0) = App.Path & "\dbCustomer.mdb"
CrystalReport1.Password = "customerdatabase2006"
CrystalReport1.ReportFileName = App.Path & "\Outward1.rpt"
CrystalReport1.CopiesToPrinter = 1
CrystalReport1.WindowTitle = "Customer Management V1.0"
CrystalReport1.WindowState = crptMaximized
CrystalReport1.Action = 1
End Sub
Re: Runtime-time Error '20535'
If you only have a database password you need to use
CrystalReport1.Password = chr$(10) & "db password"
If you have user and database passwords use
CrystalReport1.Password "user password " & Chr$(10) & "db password"
Re: Runtime-time Error '20535'
Dear brucevde,
Thank you so much for the help. It works for the program!!! And i can view my Crystal Report :) Thank you~!!!!!
Best regards,
silentd
Re: Runtime-time Error '20535'
Thank you to VBFNewComer too :) Really appreciate your reply :)