Solved

Array dimensions do not match

Posted on 2004-09-07
6
745 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
[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
6 Comments
 
LVL 18

Expert Comment

by:JR2003
ID: 11995344
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_
ID: 11995649
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
ID: 11995936
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
ID: 11996085
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
ID: 12683691
Today it is 26th November so I guess those 4 days have well and truly passed!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
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…

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