Results 1 to 2 of 2

Thread: MS Access Help

  1. #1
    Join Date
    May 2004

    Red face Unanswered: MS Access Help

    I am not a familiar with MS Access and am having some issues.

    I have created a form and used VB code behind the form. I have also created a store procedure and am attempting to connect to the server and execute the store procedure.

    I keep received the error "item cannot be found in the collection corresponding" at the cmd1.parameters(1) = sqltext step. Here is the code

    cnn.conectionstring = "provider=SQLOLEDB; Data Source=xxxxxx; Initial Catalog=RiskMaster; user id=xxxx; password=xxxx"

    cmd1.activeconnection = cnn
    cmd1.commandtype = adcmdstoredProce
    cmd1.commandtext = "sp_CurrentClaims"
    cmd1.parameters(1) = sqltext

    Please, any ideas?


  2. #2
    Join Date
    May 2005
    Nevada, USA
    Provided Answers: 6
    What does sqltext contain? Here's a sample of how I pass parameters to a stored procedure:

    cmd.Parameters.Append .CreateParameter("@PassName", adVarChar, adParamInput, 25, Me.txtPassName)

Posting Permissions

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