Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

parameters.refresh fails

Posted on 2002-06-27
5
Medium Priority
?
252 Views
Last Modified: 2012-06-27
vb 6 sp4 ms sql server 7.
Any ideas why the parameters.refresh should fail to update the parameters collection?
TIA
0
Comment
Question by:Philip Pinnell
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 13

Author Comment

by:Philip Pinnell
ID: 7113144
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
    .Parameters.Refresh
   
    '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?
0
 
LVL 13

Author Comment

by:Philip Pinnell
ID: 7113179
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.

0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 7113346
Don't leave the question opened. Ask the Community Support for deletion.
0
 
LVL 1

Accepted Solution

by:
Moondancer earned 0 total points
ID: 7113562
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.
Thanks,
Moondancer - EE Moderator
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question