fixed codes & sql syntaxes to let the server work with SQL Server using mssql driver