Results 1 to 2 of 2

Thread: Unable to connect : incorrect session parameter

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    1

    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:
    1. Set f = New frmPrintWindow
    2.    
    3.         f.Report1.WindowParentHandle = f.hWnd
    4.         f.Report1.ReportSource = 0 '-ReportFile
    5.         f.Report1.Connect = gdb.ConnectionString
    6.         f.Report1.ReportFileName = App.Path & "\" & pcReportName
    7.         f.Report1.Action = 1
    8.         f.Caption = f.Caption & " (" & pcReportTitle & ")"
    9.         f.WindowState = 0 '-Normal
    10.         f.Show
    11.         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 OLEDBatabase 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
    Last edited by Hack; Sep 7th, 2005 at 05:42 AM.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Unable to connect : incorrect session parameter

    Welcome to the forums.

    Try this for a connection:
    VB Code:
    1. Dim ADOCn As ADODB.Connection
    2. Dim ConnString As String
    3.  
    4. ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path
    5. & "\Database\AMS.mdb;Persist Security Info=False;Jet OLEDBatabase Password=123""
    6.  
    7. Set ADOCn = New ADODB.Connection
    8. ADOCn.ConnectionString = ConnString
    9. ADOCn.Open ConnString

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width