1

I want to ask if it is possible to connect to SAGE with PHP, using odbc(SAGE Gestion commerciale 100)? I've succeeded to connect only with MS Query (MS Excel).

kcrisman
  • 4,374
  • 20
  • 41
donia
  • 29
  • 3
  • Well, PHP has both an ODBC extension and an ODBC driver for PDO, as you probably know. Is your question about Sage (or SageMath), the suite of open-source applications for mathematics? – Álvaro González Jul 22 '17 at 11:28
  • I've tried to use the odbc provided with the "SAGE Ligne 100". – donia Jul 22 '17 at 12:20
  • @ÁlvaroGonzález I think the problem is related to the odbc which is 32 bits( I'm using Windows 7 64 bits). I got this error "Simba ODBC Driver][CBase]Dossier non ouvert". – donia Jul 27 '17 at 13:11

1 Answers1

0

I've succeeded to connect to SAGE with PHP, using odbc(SAGE Gestion commerciale 100). here is my code :

 <?php
      $dsn= "GestCom_Sage100";
      $conn = odbc_connect($dsn,$user,$pass);
?>

GestCom_Sage100 is the name of the dataSource. You should use xampp to run your php code because its an 32 bits application and ODBC SAGE is also an 32 bits application.

I hope that it helps you.

Sabra
  • 177
  • 2
  • 19