Results 1 to 2 of 2

Thread: problem with function

  1. #1

    Thread Starter
    Member
    Join Date
    May 2000
    Location
    London, UK
    Posts
    39

    Cool

    I have not done a lot of vb and would like help with the following.


    <SCRIPT LANGUAGE="VBScript" RUNAT="Server">

    Const SESN_GEO = "GEO_SESSION"

    Function CallGeo(ByVal Lat, ByVal Lon, ByVal Map)

    CallGeo=Session(SESN_GEO).GEOMANCODE(Lat,Lon,Map)

    End Function

    </SCRIPT>


    This is my asp code , from which I am calling my function above.

    The function is not returning any values, can someone please help. I am not sure what is wrong with function.

    !!!!Please help!!!!!!!!!!


    Set Session(SESN_GEO) = CreateObject("DLLCall.class1")

    Response.Write("<html><title>TEST</title><body><hr>")

    The following code in this line, I am trying to call this routine and pass the variables. I am then trying to return the variable RuncC back.


    RunC = CallGeo(Lat, Lon, Map)
    Response.Write("<h3>Variable set to >>" + RunC + "<< ok? </h3><hr></html>")

    Set Session(SESN_GEO)=Nothing



    thanks

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    I think your problem might be because of you are using session variable try it without


    this sort of thing works ok
    Code:
    <%@ Language=VBScript%>
    <%
    
    
    dim obj
    set obj = CreateObject("project1.class1") 
    obj.whatever = "ffgg"
    
    Response.Write xx("hgj")
    
    function xx(dd)
    xx = dd & obj.whatever
    
    
    end function
    
    
    %>
    this prints "hgjffgg"
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width