I don't know if this is specific to the mssql_n driver, but I can reproduce it with the following:
$enroldb = ADONewConnection($CFG->dbtype);
$enroldb->Connect($CFG->dbhost, $CFG->dbuser, $CFG->dbpass, $CFG->dbname, true);
$enroldb->execute('set ansi_nulls on;
set ansi_warnings on;
set ansi_padding on;
set concat_null_yields_null on;');
// then examine the contents of
$enroldb->execute('select * from mdl_config')->getArray();
Fields that show up as being '' from tsql and MSSQL Server Management Express are NULL in the script.
This causes a problem upgrading to 1.9 because the admin page keeps on thinking that their are new configuration settings.