Accessing Web Service from VBA (Type MisMatch)

Discussion in 'ASP .Net Web Services' started by Ayoa, May 30, 2006.

  1. Ayoa

    Ayoa Guest

    I am attempting to call a web service from Access 2003 (using the built-in
    web services reference tool). The web service should return an array of
    integers.

    Example web method (C#)

    [WebMethod]
    public int[] GetIntArray()
    {
    int[] a = new int[5];
    for (int i = 0; i < 5; i++)
    a = i * 10;
    return a;
    }

    However at the client side (Access VBA) I am getting the Type Mismatch
    error.
    This is the function (auto-generated by the web services reference tool ) in
    VBA that gives the error.

    Public Function wsm_GetIntArray() As Variant
    'Error Trap
    On Error GoTo wsm_GetIntArrayTrap

    wsm_GetIntArray = sc_GuidelinesService.GetIntArray()

    Exit Function
    wsm_GetIntArrayTrap:
    GuidelinesServiceErrorHandler "wsm_GetIntArray"
    End Function

    When i call my web method from a c# client, it works Ok.

    Any suggestion how how to fix this is welcome?
    Ayoa, May 30, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. data type mismatch error

    , Aug 10, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    626
    Karl Seguin
    Aug 10, 2005
  2. Matt Fitzmaurice

    Losing XML nodes when passing from VBA to Web Service

    Matt Fitzmaurice, Oct 3, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    143
    Matt Fitzmaurice
    Oct 3, 2003
  3. Mike Dearman
    Replies:
    1
    Views:
    182
    Mike Dearman
    Jun 23, 2004
  4. Replies:
    4
    Views:
    188
  5. programmingzeal
    Replies:
    0
    Views:
    1,093
    programmingzeal
    May 6, 2012
Loading...

Share This Page