Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why are COM parameters Object data types ?
Message
From
14/12/1999 20:31:23
Scott Knight
Human Resources Development Canada
St. John's, Newfoundland, Canada
 
 
To
14/12/1999 15:42:23
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00303448
Message ID:
00303799
Views:
24
>Is that by choice or is it the only way you get the variables to character type. It seems like a lot of typing and potential for bugs having doubles for all the variables. But if that's the way that's the way. Did you run into the same sort of thing that I am running into ?

Scott,
>
>This is how I do it...
>
>ASP Page:
>##############################
><%
> myname=request.form("username")
> mypassword=request.form("userpassword")
>
> IF len(myname) > 0 THEN
> Set oSecurity = Nothing
> Set oSecurity = server.CreateObject("foxproCOMserver.security")
> cReturn = oSecurity.validateuser(myname,mypassword)
>[snip...]
>%>
>##############################
>
>- A Hilton
>
>
>>>Sorry for some reason part of the message did not post...
>>
>>I fairly new in the COM world so this may be very simple. I have created a simple VFP COM Object which receives four parameters from an ASP Page. The COM object receives the parameters o.k. but they are of object type making manipulation difficult. All the documentation I have read tells me the following should work and pass the request object item values as character :
>>>
>>>'ASP page Section
>>>
>>*Server side script
>>If Len(Request("txtday")) > 0 Then
>> Set oServer = Server.CreateObject("CentralWeb.Download")
>> Response.write(Request("txtday"))
>> strResult = oServer.GetDownLoad(Request("txtday"),Request ("DropMonth"),Request("DropYear"),Request("DropType"))
>> Response.write("
")
>> Response.write(StrResult)
>>Else
>> ' No day entered write message back
>> Response.Write "Please input a day to display report"
>>End if
>>>
>>>'COM component
>>>Function GetDownload
>>>lParameters lcday,lcMonth,lcYear,lctype
>>>return type('lcday')
>>>*I want to be able to do more here with the parameters (i.e. build a date) but I can't.
>>>
>>>I thought all request items were of character data type ? Why does this return object type for all four and How do I get around it
>>>
>>>Thanks in Advance
>>>
>>>
>>>Scott
Previous
Reply
Map
View

Click here to load this message in the networking platform