Welcome! Log In Create A New Profile

Advanced

Class object not returning string values

Posted by Prolay Sarkar 
Prolay Sarkar
Class object not returning string values
January 02, 2009 10:09AM
Hi,

I have a class made from a query and in a global function i am returning the object of the class. But at the calling end i am not able to get the value of string member.

CLASS
----------

CQRY_Lookup_City is class
PUBLIC
lookup_id is int
lookup_name is string
END

GLOBAL FUNCTION
------------------------------

FUNCTION New_Global_Proc()

HExecuteQuery(QRY_Lookup_State,hQueryDefault,"100001")
HReadFirst(QRY_Lookup_State)
IF HFound()=True THEN

ab is CQRY_Lookup_City
FileToMemory(ab,QRY_Lookup_State)
RETURN = ab
END
END

CALLING END
-------------------
abc is CQRY_Lookup_City
abc=New_Global_Proc()


OBJECT VALUE AT FUNCTION LEVEL (absmiling smiley
---------------------------------------
lookup_id =1
lookup_name = "ABCD"


OBJECT VALUE AT CALLING SIDE (abcsmiling smiley
---------------------------------------
lookup_id =1
lookup_name = ""
Prolay Sarkar
Re: Class object not returning string values
January 02, 2009 11:52AM
hi,

I tried Serializing/Deserializing the object and i was able to get the values.
Anyone with a better solution?

Regards
Prolay
BLS
Re: Class object not returning string values
January 03, 2009 07:48AM
Hi Prolay,
FUNCTION New_Global_Proc() contains at least one bug.

Replace "RETURN = ab" with "RESULT ab".


The RETURN keyword has a different meaning: See Online Help:
beside; the second "END" is not nessesary

Regarding your 3 tier request... Search Online Help for RPC

HTH Bjoern




Edited 1 time(s). Last edit at 01/03/2009 07:50AM by BLS.
Prolay Sarkar
Re: Class object not returning string values
January 05, 2009 06:19AM
Quote
BLS
Hi Prolay,
FUNCTION New_Global_Proc() contains at least one bug.

Replace "RETURN = ab" with "RESULT ab".


The RETURN keyword has a different meaning: See Online Help:
beside; the second "END" is not nessesary

Regarding your 3 tier request... Search Online Help for RPC

HTH Bjoern




Edited 1 times. Last edit at 01/03/09 07:50AM by BLS.

Hi,

I tried with RESULT ab , but still not working basically i tried RESULT first and then i tried RETURN.

Does windev support remote object invocation as supported by .NET remoting framework?

Regards,
Prolay
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: