I'm trying to connect to a remote pervasive database from a php script using a dsn-less ODBC connection. It works when I use a DSN, but not when I try a dsn-less connection. Here's the connection string I'm trying:

$dsn2 = "DRIVER={Pervasive ODBC Client Interface};ServerName=jsoft.ca:1583;ServerDSN=DEMO ";

echo $thetable;

$connect = odbc_connect($dsn2, "", ""); // connect to DEMO database no userid or password

$query = "SELECT * from $thetable"; // set the query variable to contain the SQL you want to execute

$result = odbc_exec($connect, $query); // perform the query

// print out the entire resultset as HTML table (uncomment following line)

// odbc_result_all($result);

... And here's the error I'm getting:

Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/www/pvswsample1_ODBC.php on line 63

If I use a DSN it works. Here's the string and odbc.ini for that:

$connect = odbc_connect("REMOTE_DEMO", "", ""); // connect to DEMODATA database no userid or password


[ODBC Data Sources]
REMOTE_DEMO=Pervasive ODBC Client Interface

Description=Pervasive ODBC Client Interface: jsoft.ca:1583/DEMO

Any help would be greatly appreciated