PDA

Click to See Complete Forum and Search --> : return data from a string into sep variables


raj2000
Jun 20th, 2000, 05:55 PM
What is the easiest way of returning the following values into separate variables in asp via a call to a vb function.



Res=Map=OS2000.Map, MapO=2, Lat1=50.708286, Lat2=50.798220, Lat3=50.797615, Lat4=50.707683, Lon1=-001.575082, Lon2=-001.574267, Lon3=-001.432362, Lon4=-001.433449 , Page=7, XCur=14, YCur=45, Col= H, Row= 5 , Page=12, XCur=14, YCur=45, Col= G, Row= 7

Ianpbaker
Jun 20th, 2000, 07:56 PM
Hi Raj2000

When I said in my earlier post of converting everything to a string I think you might miss-understood what I meant Ferom your last post on this subject..

If you convert each variable into a string, then pass it into an array and then pass that back through the function.

EG.

MyArray("Map") = "OS2000.Map"
MyArray("Map0") = "2"

etc..

Then pass that the array back throught the function and then in the asp you can then grab the information by using

MyMapvar = myarray("Map")

Hope this helps

Ian

Ianpbaker
Jun 20th, 2000, 08:02 PM
Hi Again i've just seen you asp code in your other post, so give this a go.


I want to receive values back from a calling dll function?

How do I do this?

This is the 'ASP' code I am using

<% @Language = "VBScript" %>
<% Response.buffer = true %>

<%
Dim Msg
Dim Lat
Dim Lon
Dim Map




Msg = Maps & "," & Lon &"," & Lat


' Lat=Request.QueryString("Lat")
' Lon=Request.QueryString("Lon")
' Map=Request.QueryString("Map")

Map = "OS2000.Map"

userid="1"

Lat = "50.748867"
Lon = "-001.554733"




Dim finalm

Set finalm = Server.CreateObject("DLLCall.Geomanconv")

RetStr=finalm.GEOMANCODE(Lat,Lon,Map)

returnmap = RetStr("Map")
returnmapO = Retstr("Map0")


etc...

%>

<%="Res="&RetStr%>


As Long as the array you are returning is a variant, you shouldn't have any problems

Ian