Example COM with php    AccountNum  Name  Address  Phone  Fax  Dear All,
   
  I wrote below code in PHP,i got this error ,anybody how can i solve this 
error.
   
   
  Fatal error: Cannot instantiate non-existent class: com in 
/var/www/html/demos/traniee/phpCOMExample.php on line 30 
        Regards,  Shaburuddin.         

Luis Martinez <[EMAIL PROTECTED]> wrote:          An example, retrieving 
customer information code.

Observation: in my last post , I said to yours that had problems with com
connector... peculiarly with php does not appear to me any error (Apache +
php)... but with IIS (Internet Information Server) yes,
any Idea about it ?

greetings.

***************************************************************
<html>
<head>
<style type="text/css">
.encabezado {
font-size:9px;font-family:'Arial,Verdana';background-color:#c0c0c0;font-weight:bold
}
.sombra {
font-size:10px;font-family:'Arial,Verdana';background-color:#cccccc;font-weight:bold
}
.sinsombra {
font-size:10px;font-family:'Arial,Verdana';background-color:#ffffff;font-weight:bold
}
</style>
<title>Axapta Internet Connector - PHP Sample</title>
</head>
<body>
<center>
<table style="border:1px solid #000000" CELLSPACING="1" CELLPADDING="0"
WIDTH="600">
<tr><td colspan="5" align="center" class="Encabezado">Example COM with
php</td></tr>
<tr>
<td WIDTH="20%" class="encabezado">AccountNum</td>
<td WIDTH="25%" class="encabezado">Name</td>
<td WIDTH="25%" class="encabezado">Address</td>
<td WIDTH="15%" class="encabezado">Phone</td>
<td WIDTH="15%" class="encabezado">Fax</td>
</tr>
<?php
$Axapta = new COM("AxaptaComConnector.Axapta");
$Axapta->Logon("Admin","","","c:\fortaAOS.axc");
$CustTable = 77;
$CustTable_Name = 2;
$AxaptaQuery = $Axapta->CreateObject("Query");
$AxaptaDataSource = $AxaptaQuery->Call("AddDataSource", $CustTable);
$AxaptaRange = $AxaptaDataSource->Call("AddRange", $CustTable_Name);
$AxaptaQueryRun = $Axapta->CreateObject("QueryRun", $AxaptaQuery);

$result = $AxaptaQueryRun->Call("Next");
$si = 1;
while ($result) {
$CustTableBuffer = $AxaptaQueryRun->Call("GetNo", 1);
$AccountNumber = $CustTableBuffer->Field("AccountNum");
$Name = $CustTableBuffer->Field("Name");
$Address = $CustTableBuffer->Field("Address");
$Phone = $CustTableBuffer->Field("Phone");
$Fax = $CustTableBuffer->Field("Telefax");
if($si) { echo "<TR class='sinsombra'>"; $si = 0; } else { echo "<TR
class='sombra'>"; $si = 1; }
echo "<TD WIDTH='25%'
VALIGN='TOP'>".mysql_real_escape_string($AccountNumber)."</TD>";
echo "<TD WIDTH='55%'
VALIGN='TOP'>".mysql_real_escape_string($Name)."</TD>";
echo "<TD WIDTH='55%'
VALIGN='TOP'>".mysql_real_escape_string($Address)."</TD>";
echo "<TD WIDTH='10%'
VALIGN='TOP'>".mysql_real_escape_string($Phone)."</TD>";
echo "<TD WIDTH='10%'
VALIGN='TOP'>".mysql_real_escape_string($Fax)."</TD></TR>\n";
$result = $AxaptaQueryRun->Call("Next");
}
$Axapta->Logoff();
unset($Axapta);
?>
</table>
</center>
</body>
</html>

***************************************************************

On 1/3/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Dear all,
> I can connect .NET to Axapta using Business connector(Using IAxapta...
> Interfaces ).
> I have one functionality in which we need to connect PHP software to
> Axapta using Business connector ,Is it possible ,if possible how can I
> connect PHP to Axapta Using Axapta Business connector..
> If possible plz send some sample codes ,why because i am new to PHP
> software.
> Any kind of help will be highly appreciated.
>
> Regards,
> Shaburuddin | Technical Consultant | Hyd | India | +91-09885776135.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> [Non-text portions of this message have been removed]
>
> 
>

-- 
Lic. Luis Enrique Martínez Peña
Analista Programador Axapta
Consultor Sistemas Web
Off. (81) 8335 0620 ext 8564
http://www.it-soluciones.com.mx

[Non-text portions of this message have been removed]



         

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

[Non-text portions of this message have been removed]

Reply via email to