Consultor Eletrônico



Kbase 18628: OPEN CLIENT: Using Unknown (?) with a Visual Basic Proxy
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   20/05/1999
SUMMARY:

The following precaution must be taken when using an Open AppServer
proxy in Visual Basic. The problem involves using a method of the
proxy object that has both an input and an output parameter that were specified in ProxyGen to allow Unknown values (that is, ?). The
Visual Basic program should not pass the same variable for both the
input and the output parameter. If it does, and the variable's value
is something other than null at the time of the call, the input
value will never be sent to the proxy. Instead the proxy will
receive the null (Unknown) value.

EXPLANATION:

For example, the following code will not receive the value 1234.
Instead it will receive a null Variant.

Dim val As Variant

appObj = New CInventory
appObj.OC_Connect(<connection parameters>)
val = CLng(1234) ' item #
appObj.getItemCount(val, val)
MsgBox "Count is " + Str(val)