Hi Luis,

In your example we can retrieve data from table in axapta.

Can you give me exaple code or any reference website to execute query or class 
in axapta objects.

Regards
Yahya

  ----- Original Message ----- 
  From: Luis Martinez 
  To: Axapta-Knowledge-Village@yahoogroups.com 
  Sent: Wednesday, January 03, 2007 9:55 PM
  Subject: Re: [Axapta-Knowledge-Village] How can we Connect PHP software to 
Axapta ,Is it Possible through business connector?


  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]



   


------------------------------------------------------------------------------


  No virus found in this incoming message.
  Checked by AVG Free Edition.
  Version: 7.5.432 / Virus Database: 268.16.0/610 - Release Date: 12/30/2006 
2:59 PM


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

Reply via email to