Scheduler and SQLSRV driver

I’m having a great deal of difficulty getting the sample timeline talking to my SQL Server Database.

In working through the samples/06_timeline/04_tree_db.html example, I would like to use SQL Server to store all of my information. I’ve created the table, events_tt and loaded it with sample data. I’ve confirmed that I can talk to my database and return the data through a simple test page.

As soon as I go to configure the events_tree_db.php file, I run into problems.

Here’s my events_tree_db.php file:

[code] include (’…/…/…/codebase/connector/scheduler_connector.php’);
include (’…/…/…/codebase/connector/db_sqlsrv.php’);

$serverName = '';
$connectionInfo = array("Database"=>"DHTMLX", "UID"=>"username", "PWD"=>"password");
$res = sqlsrv_connect($serverName, $connectionInfo) or die("Unable to connect");

$scheduler = new schedulerConnector($res, "SQLSrv");



If I try to navigate to this page, I receive the following:

PHP Warning: Invalid argument supplied for foreach() in C:\inetpub\wwwroot\js2\connector-php\codebase\db_sqlsrv.php on line 47

Aside from visiting my local wig shop, any suggestions as to why this is causing me fits? I’ve tried various flavors of the server name, only to come up with the same response.

Web Server is IIS7.5, Windows 7, PHP 5.3.10

Thanks in advance.


please, try to update db_sqlsrv.php from attachment. (1.31 KB)

Wow thanks radyno. That did the trick!