Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Array dimensions do not match

Posted on 2004-09-07
6
Medium Priority
?
752 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 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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 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…
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…
Suggested Courses

604 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