Sunday, September 16, 2018

Connect to Netsuite ODBC using PHP

Customer would like to utilize NS ODBC Views and be able to connect to it using external application like PHP.

How do we accomplish this? Do we need to install other driver or application other than the ones mentioned in the Enterprise Reporting Views Guide?

 

 

No need to install other driver except from the ones mentioned in the ERV Help Guide. These needs to be installed first in the Web Server where you will be running the PHP Application connecting to ODBC.

1.       Visual C++ 2008 Redistributables - http://www.slproweb.com/products/Win32OpenSSL.html.

       Note: that you need to pick the (x64) only if you're using a 64 bit machine.

2.       Win32 OpenSSL v1.0.1e Light Preview  - http://www.slproweb.com/products/Win32OpenSSL.html -

       Note: that you need to install Win64 OpenSSL v0.9.8l Light if you're using 64 bit machine.

3.       ODBC Driver

 

Here's a sample PHP code:

 

 

//connect to a DSN "myDSN"

$conn = odbc_connect('Netsuite.com','eileen@sample.com','somepassword');

if ($conn)

{

echo "Netsuite ODBC Connection Successful!";

  //close the connection

  odbc_close ($conn);

}

else echo "odbc not connected";

 

 

 



No comments:

Post a Comment