Solved

Array dimensions do not match

Posted on 2004-09-07
6
717 Views
Last Modified: 2012-06-22
I have written this:

Private Sub Command0_Click()
Dim c As clsws_SFlow
Set c = New clsws_SFlow
Dim v As Variant
v = c.wsm_GetInstructionsTest("SSLConvey", "garnys", "courage")
MsgBox (v)
End Sub

Which calls:

Public Function wsm_GetInstructionsTest(ByVal str_sSource As String, ByVal str_sUser As String, ByVal str_sPass As String) As Variant
    '*****************************************************************
    'Proxy function created from http://195.217.202.154/application/cmti/webservice/searchflowws.asmx?wsdl.
    '
    '"wsm_GetInstructionsTest" is an array with elements defined as Variant
    'See Complex Types: Arrays in Microsoft Office 2003 Web Services Toolkit Help
    'for details on implementing arrays.
    '*****************************************************************

    'Error Trap
    On Error GoTo wsm_GetInstructionsTestTrap

    wsm_GetInstructionsTest = sc_SFlow.GetInstructionsTest(str_sSource, str_sUser, str_sPass)

Exit Function
wsm_GetInstructionsTestTrap:
    SFlowErrorHandler "wsm_GetInstructionsTest"
End Function


But i am getting the error "SoapMapper: Array dimensions do not match" from the line "v = c.wsm_GetInstructionsTest("SSLConvey", "garnys", "courage")"....help?
0
Comment
Question by:danBosh
6 Comments
 
LVL 18

Expert Comment

by:JR2003
Comment Utility
Are you sure the error is not coming from this line?

wsm_GetInstructionsTest = sc_SFlow.GetInstructionsTest(str_sSource, str_sUser, str_sPass)
0
 
LVL 7

Expert Comment

by:_agj_
Comment Utility
the error would be shown on the line as danBOsh says...because the error though generated by a function internal to this wsm_getinstructions function.

I guess you could try out the webservice internally to check if it works. The array might need to be implemented differently.
0
 

Author Comment

by:danBosh
Comment Utility
What? so are u saying that the error is thrown from the webservice and not the code i have shown above?...
0
 
LVL 18

Accepted Solution

by:
JR2003 earned 50 total points
Comment Utility
When an error is raised it has a .Source property and a .Desription property and a .ErrorNumber which contains the error number. If you include an error trap in each procedure you write it will be much easier to find the exact reason for the error. Here is some code you could paste into each of your functions:



    On Error GoTo Trap



    'Main body of code here
    '....
    '....
    '....
    '....

    GoTo SkipTrap

Trap:
   
    Dim iResult As VbMsgBoxResult
    With Err
        iResult = MsgBox("Error: " & .Number & vbNewLine & _
                "Description: " & .Description & vbNewLine & _
                "Source: " & .Source, vbAbortRetryIgnore Or vbExclamation, "Error")
        If iResult = vbRetry Then
            Resume
        ElseIf iResult = vbIgnore Then
            Resume Next
        End If
    End With

SkipTrap:

0
 
LVL 45

Expert Comment

by:patrickab
Comment Utility
Today it is 26th November so I guess those 4 days have well and truly passed!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now