Results 1 to 3 of 3

Thread: RecordCount -1

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2001
    Location
    Kuala Lumpur
    Posts
    212

    RecordCount -1

    I understand that Cursor location can cause this problem. I tried to put cursor location and it prompts me error, it said

    Arguement is wrong type or conflict with another or out of acceptable range. Kindly, assist me please. Thanks. Below is my code.

    This is actually in VB script

    Code:
     
    
    set myConnection = CreateObject("ADODB.Connection")
    set SQLrecordset = CreateObject("ADODB.Recordset") 
    myConnection.Open = "DSN=cnote;SOURCE=localhost;DATABASE=eai;user id='atoo';password='rtor' "
    
    myconnection.CursorLocation = adUseClient ' Error here 
    
    VarSQL  = "SELECT * FROM  agcn_process where  CN_CODE = '"&RstID&"' "
    SQLrecordset.Open VarSQL, myConnection
    Last edited by kokzai; Nov 21st, 2003 at 05:03 AM.
    kC

  2. #2
    Addicted Member cutamacious's Avatar
    Join Date
    May 2001
    Location
    INDIA >> Andhra Pradesh >> Hyderabad
    Posts
    185

    Re: RecordCount -1

    Originally posted by kokzai
    I understand that Cursor location can cause this problem. I tried to put cursor location and it prompts me error, it said

    Arguement is wrong type or conflict with another or out of acceptable range. Kindly, assist me please. Thanks. Below is my code.

    This is actually in VB script

    Code:
     
    
    set myConnection = CreateObject("ADODB.Connection")
    set SQLrecordset = CreateObject("ADODB.Recordset") 
    myConnection.Open = "DSN=cnote;SOURCE=localhost;DATABASE=eai;user id='atoo';password='rtor' "
    
    myconnection.CursorLocation = adUseClient ' Error here 
    
    VarSQL  = "SELECT * FROM  agcn_process where  CN_CODE = '"&RstID&"' "
    SQLrecordset.Open VarSQL, myConnection




    Well try specifying the cursorlocation for the recordset instead
    Cute Member

  3. #3
    Addicted Member cutamacious's Avatar
    Join Date
    May 2001
    Location
    INDIA >> Andhra Pradesh >> Hyderabad
    Posts
    185
    Also u need to set the cursorlocation before opening the connexion not after opening
    Cute Member

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