• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

parameters.refresh fails

vb 6 sp4 ms sql server 7.
Any ideas why the parameters.refresh should fail to update the parameters collection?
George Hirst
George Hirst
  • 2
  • 2
1 Solution
George HirstAuthor Commented:
lngPartyID As Long, _
  strErrorMessage As String) As Integer

  'Runs stRDRAPIGetUserPermissions stored procedure
  Dim objCmd As ADODB.Command
  Dim objRS As ADODB.Recordset
  On Error GoTo ErrHandler
  gblnReadWrite = False
  gblnReadOnly = False
  Set objCmd = New ADODB.Command
  With objCmd
    'set up command object
    Set .ActiveConnection = db.Connection
    .CommandText = "stRDRAPIGetUserPermissions"
    .CommandType = adCmdStoredProc
    'populate command object with parameter values
    .Parameters("@iRoleScheme").Value = "ISA/PEP MANAGER"
the error occurs in this last line as this parameter does not exist. parametrs.count = 0.
Error is "item cannot be found in this collection ... etc"

Sorry but what do you mean by provider?
George HirstAuthor Commented:
Thanks for your interest but I have found the problem. In actual fact the stored procedure could not be found but it didn't tell me this until after I had changed the code to manually add the parameters.

Éric MoreauSenior .Net ConsultantCommented:
Don't leave the question opened. Ask the Community Support for deletion.
50 points refunded rather than deleted and moved to PAQ at zero to close, since the problem and solution were posted by Andy and may help others with similar roadblocks.
Moondancer - EE Moderator
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now