By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,988 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,988 IT Pros & Developers. It's quick & easy.

Problem with COM objetcs

P: n/a
Hi, I'm trying to list all videos of my object, but i have no response:

$myVideos = new COM("VideoObjects.Videos");
$strTitle="Matrix";
$strStudio="warner";
$myVideos->Load($strTitle, $strStudio);

while($obj = $myVideos->Next()) {
echo $myVideos->title;
}

$myVideos->Release();
$myVideos = null;
?>

If I do the same thing with ASP: I have a list with three movies... :-)

Set myVideos = Server.CreateObject("VideoObjects.Videos")
strTitle = "Matrix"
strStudio = "Warner"
myVideos.Load CStr(strTitle), CStr(strStudio)

For Each Video In myVideos
Response.Write Video.Title
Next

Set myVideos = Nothing

What am I doing wrong ?

TIA

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
robot wrote:
Hi, I'm trying to list all videos of my object, but i have no response:

$myVideos = new COM("VideoObjects.Videos");
$strTitle="Matrix";
$strStudio="warner";
$myVideos->Load($strTitle, $strStudio);

while($obj = $myVideos->Next()) {
echo $myVideos->title;
Hi not sure, I never coded with COM under PHP before, but:

Shouldn't this be:
echo $obj->title;

}

$myVideos->Release();
$myVideos = null;
?>

If I do the same thing with ASP: I have a list with three movies... :-)

Set myVideos = Server.CreateObject("VideoObjects.Videos")
strTitle = "Matrix"
strStudio = "Warner"
myVideos.Load CStr(strTitle), CStr(strStudio)

For Each Video In myVideos
Response.Write Video.Title
Next

Set myVideos = Nothing

What am I doing wrong ?

TIA


Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.