Unable to connect : incorrect session parameter
hi can anyone help me?
Im using Crystal Report 8.5 in a vb6 application. Im using access 200 password protected database.
VB Code:
Set f = New frmPrintWindow
f.Report1.WindowParentHandle = f.hWnd
f.Report1.ReportSource = 0 '-ReportFile
f.Report1.Connect = gdb.ConnectionString
f.Report1.ReportFileName = App.Path & "\" & pcReportName
f.Report1.Action = 1
f.Caption = f.Caption & " (" & pcReportTitle & ")"
f.WindowState = 0 '-Normal
f.Show
Call CPointer
this is the connection string that i used
gdb.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\Database\AMS.mdb;Persist Security Info=False;Jet OLEDB:Database Password=123"
this results to an error which is "unable to connect : incorrect session parameters"
what sould i do to correct this? thanks
Edit: Added [vbcode][/vbcode] tags for clairty. - Hack
Re: Unable to connect : incorrect session parameter
Welcome to the forums. :)
Try this for a connection:
VB Code:
Dim ADOCn As ADODB.Connection
Dim ConnString As String
ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path
& "\Database\AMS.mdb;Persist Security Info=False;Jet OLEDBatabase Password=123""
Set ADOCn = New ADODB.Connection
ADOCn.ConnectionString = ConnString
ADOCn.Open ConnString