[Openroad-users] OR App Server from within C#

Neil.Warnock at luminary.co.uk Neil.Warnock at luminary.co.uk
Tue Feb 26 04:59:01 EST 2008


Hi Pete,

Maybe the problem is one of boxing params into objects?  See the UKIUA site /conference/Autumn2005/NeilWarnock_1005.pdf  slide 16.

    ...

    try {

 /* declare params to pass */

        pdo.DeclareAttribute("hellostring", "STRING");
        pdo.DeclareAttribute("counter"    , "INTEGER");

 /* set params to pass - use object references */

        Object objStr = "Hello AppServer from C#!");
        pdo.SetAttribute("hellostring", ref objStr);

        Object objInt = 99;
        pdo.SetAttribute("counter", ref objInt);

 /* Make call - passing an object reference */

 Object objPDO = pdo;
        rso.CallProc("HelloWorld", null, ref objPDO);

    /* process values in the byref pdo */

        Console.WriteLine("hellostring = {0}", pdo.GetAttribute("hellostring").ToString());
        Console.WriteLine("counter     = {0}", pdo.GetAttribute("counter").ToString());


HTH

Neil Warnock
Luminary - An Ingres Company
Tel: +44 (0)845 371 4090
Mob: +44 (0)771 265 0291
Email: Neil.Warnock at luminary.co.uk<mailto:Neil.Warnock at luminary.co.uk>

For more information on Luminary go to http://www.luminary.co.uk<http://www.luminary.co.uk/>
Luminary Solutions Limited Registered in England No 4854134 VAT Reg No. 829 3166 13
Registered Office: Lacon House, Theobald's Road, London, WC1X 8RW


________________________________
From: openroad-users-bounces at peerlessit.com [mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Pete Rabjohns
Sent: Monday, February 25, 2008 11:56 AM
To: International OpenROAD Users
Subject: [Openroad-users] OR App Server from within C#

Hi,

Anyone get any examples of calling OR4.1 App Server objects from within c#?

I'm having problems getting the correct data type into the SetAttribute method of the ParameterData object.

Regards,

Pete

Pete Rabjohns
Systems Architect
Atex

Email:      pete.rabjohns at atex.com<mailto:pete.rabjohns at atex.com>
Web:       http://www.atex.com<http://www.atex.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.peerlessit.com/pipermail/openroad-users/attachments/20080225/e9cb993d/attachment.html 


More information about the Openroad-users mailing list