Re: PHP and RedBack COM objects

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I got it to work finally...

The trick is that yes they are Variants.
But very odd ones..

the extract function I rewrote to work more efficiently and the properties must be accessed through:

$COMObject["property"]->Value

Looks Greek to me but that's what must get done and it works great in PHP.

Chalk up another thing for what PHP CAN do. (I prefer it over ASP any day.)

Brian

Jason Barnett wrote:
I checked it out a bit last night, since I don't own a license for RedBack (no offense :)) I tried checking the online manuals. Didn't see too much that looked useful. AFAIK the objects were supposed to be returning strings for the Value call, but I'm thinking that I somehow missed something and Value is just returning objects instead. Not sure what kind (again, I don't have a library to test) but my best guess is they're VARIANTs.

When you do figure out the answer to your problem, please post it here. There aren't many PHPers that use RedBack, but your solution may really help those in need.


Brian E wrote:

Please note.. some debugging code does exist. Also the server maybe just misconfigured... it comes with no documentation of where to put the .ini file that pairs with the COM object.

Here you go:

<?
//Response.Expires = 0
ini_set("max_execution_time","0");
error_reporting(0);
//' This function demonstrates how to extract values from a multivalued field
function ExtractMultiValues($redField)
{
$strValue = "";
echo $redFiled->Count . " ";


minor typo:
      echo $redField->Count . " ";

if ($redField->Count > 1){
for($count=1;$count <= $redField->Count;$count++)
{
if (strlen(trim($strValue)) > 0)
$strValue = $strValue . $redField->Value($count-1) .


test Value here and see if it's an object that you get. All of your strings below are sent through this function so this *has* to be the problem.

"<br>";
            else
                $strValue = $redField->Value($count-1) . "<br>";
            }
        }
    else
        $strValue = $redField->Value(0);


it would also be interesting to test this and make sure this gives you what you want as well (string?)

    return $strValue;
}


-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux