简体   繁体   中英

Sage 50 ODBC using PHP-SQL state IM002

I'm trying to set up an ODBC connection to connect to Sage. The DSN is set up and works via Access and Excel. However using the PHP code below,

I get "SQL state IM002" or "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"

$odbc['dsn'] = "SageLine50v19";
$odbc['user'] = "Peachtree";
$odbc['pass'] = "XXXXX";
$mysql['host'] = "localhost";
$mysql['user'] = "root";
$mysql['pass'] = "";
$mysql['dbname'] = "sagetest";
$mysql['idfield'] = "id";
$debug=true;

Thanks

Deleteing the USER data source name and define it as a SYSTEM data source name.

Control Panel -> Administrative Tools ->Data Sources (ODBC): - User DSN : delete the specified User DSN - System DSN : create a new System DSN

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM