Error with MSSQL Database

Hi,

I’ve installed today a suiteCRM. The versions are:

Version 7.1.3
Sugar Version 6.5.17 (Build 1220)

I have some errors on apache log:
Entering admin panel:
[Wed Sep 03 20:20:00.500434 2014] [:error] [pid 7033] [client x.x.x.x] PHP Notice: Undefined index: modlink in /crm/themes/Suite7/css/colourSelector.php on line 72, referer: http://crm/index.php?module=Administration&action=index
[Wed Sep 03 20:20:00.523761 2014] [:error] [pid 7033] [client x.x.x.x] PHP Notice: Undefined index: custom in /crm/themes/Suite7/css/colourSelector.php on line 97, referer: http://crm/index.php?module=Administration&action=index

Also, on all home sections, i can see:
SQL Error : Incorrect syntax near ‘'.SQL Error : Incorrect syntax near '’.SQL Error : Incorrect syntax near ‘'.SQL Error : Incorrect syntax near '’.
On the log, i have:
[Wed Sep 03 20:22:10.846438 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near ‘'. (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:10.846546 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:10.846588 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:10.847761 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near '’. (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:10.847831 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:10.847860 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:10.856572 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near ‘'. (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:10.856649 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:10.856915 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:10.857944 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near '’. (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:10.858003 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:10.858034 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:14.461629 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near ‘'. (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:14.461711 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:14.461749 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:14.462808 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near '’. (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:14.462878 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:14.462910 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:14.471926 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near ‘'. (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:14.471998 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:14.472026 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:14.473288 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near '’. (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:14.473349 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:14.473375 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:17.575269 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near ‘'. (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:17.575351 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:17.575391 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:17.576439 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near '’. (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:17.576513 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:17.576542 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:17.585147 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near ‘'. (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:17.585218 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:17.585247 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:17.586307 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near '’. (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:17.586354 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:17.586392 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:20.326130 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near ‘'. (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:20.326215 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:20.326255 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:20.327350 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near '’. (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:20.327418 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:20.327445 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:20.335878 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near ‘'. (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:20.335956 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:20.336022 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in <path>/crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui [Wed Sep 03 20:22:20.337041 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): message: Incorrect syntax near '’. (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:20.337105 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): General SQL Server error: Check messages from the SQL Server (severity 15) in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui
[Wed Sep 03 20:22:20.337139 2014] [:error] [pid 7053] [client x.x.x.x] PHP Warning: mssql_query(): Query failed in /crm/include/database/MssqlManager.php on line 300, referer: http://crm/index.php?action=ajaxui

Sugarlog shows:
Wed Sep 3 20:22:10 2014 [7053][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone Europe/Berlin. Please set date.timezone=“Europe/Berlin” in php.ini!
Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1; Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1; Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Query Failed: SELECT TOP 16 * FROM
(
SELECT sugarfeed.id , sugarfeed.name , sugarfeed.description , sugarfeed.date_entered , sugarfeed.created_by , sugarfeed.related_module , sugarfeed.related_id , sugarfe$
OVER (ORDER BY sugarfeed.date_entered DESC) AS row_number
FROM sugarfeed where ( sugarfeed.related_module in (N’UserFeed’,N’Cases’,N’Leads’,N’Contacts’,N’Opportunities’)) AND sugarfeed.deleted=0
) AS a
WHERE row_number > 0: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_twitter’ and value = 1;
Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_twitter’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_facebook’ and value = 1;
Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_facebook’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:10 2014 [7053][1][FATAL] Query Failed: SELECT lhs_module, rhs_module FROM relationships WHERE deleted=0 AND (lhs_module = N'SecurityGroups' OR rhs_module=N'SecurityGroups'): SQL Server err$ Wed Sep 3 20:22:14 2014 [7053][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone Europe/Berlin. Please set date.timezone="Europe/Berlin" in php.ini! Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_twitter’ and value = 1;
Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_twitter’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_facebook’ and value = 1;
Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_facebook’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Query Failed: SELECT TOP 16 * FROM ( SELECT sugarfeed.id , sugarfeed.name , sugarfeed.description , sugarfeed.date_entered , sugarfeed.created_by , sugarfeed.related_module , sugarfeed.related_id , sugarfe$ OVER (ORDER BY sugarfeed.date_entered DESC) AS row_number FROM sugarfeed where ( sugarfeed.related_module in (N'UserFeed',N'Cases',N'Leads',N'Contacts',N'Opportunities')) AND sugarfeed.deleted=0 ) AS a WHERE row_number > 0: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1; Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1; Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:14 2014 [7053][1][FATAL] Query Failed: SELECT lhs_module, rhs_module FROM relationships WHERE deleted=0 AND (lhs_module = N’SecurityGroups’ OR rhs_module=N’SecurityGroups’): SQL Server err$
Wed Sep 3 20:22:17 2014 [7053][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone Europe/Berlin. Please set date.timezone=“Europe/Berlin” in php.ini!
Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1; Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1; Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT TOP 16 * FROM
(
SELECT sugarfeed.id , sugarfeed.name , sugarfeed.description , sugarfeed.date_entered , sugarfeed.created_by , sugarfeed.related_module , sugarfeed.related_id , sugarfe$
OVER (ORDER BY sugarfeed.date_entered DESC) AS row_number
FROM sugarfeed where ( sugarfeed.related_module in (N’UserFeed’,N’Cases’,N’Leads’,N’Contacts’,N’Opportunities’)) AND sugarfeed.deleted=0
) AS a
WHERE row_number > 0: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_twitter’ and value = 1;
Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_twitter’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_facebook’ and value = 1;
Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_facebook’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT lhs_module, rhs_module FROM relationships WHERE deleted=0 AND (lhs_module = N'SecurityGroups' OR rhs_module=N'SecurityGroups'): SQL Server err$ Wed Sep 3 20:22:17 2014 [7035][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone Europe/Berlin. Please set date.timezone="Europe/Berlin" in php.ini! Wed Sep 3 20:22:19 2014 [7053][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone Europe/Berlin. Please set date.timezone="Europe/Berlin" in php.ini! Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_twitter’ and value = 1;
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_twitter’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_facebook’ and value = 1;
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_facebook’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT TOP 16 * FROM ( SELECT sugarfeed.id , sugarfeed.name , sugarfeed.description , sugarfeed.date_entered , sugarfeed.created_by , sugarfeed.related_module , sugarfeed.related_id , sugarfe$ OVER (ORDER BY sugarfeed.date_entered DESC) AS row_number FROM sugarfeed where ( sugarfeed.related_module in (N'UserFeed',N'Cases',N'Leads',N'Contacts',N'Opportunities')) AND sugarfeed.deleted=0 ) AS a WHERE row_number > 0: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1; Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1; Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:17 2014 [7053][1][FATAL] Query Failed: SELECT lhs_module, rhs_module FROM relationships WHERE deleted=0 AND (lhs_module = N’SecurityGroups’ OR rhs_module=N’SecurityGroups’): SQL Server err$
Wed Sep 3 20:22:17 2014 [7035][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone Europe/Berlin. Please set date.timezone=“Europe/Berlin” in php.ini!
Wed Sep 3 20:22:19 2014 [7053][-none-][FATAL] Configuration variable date.timezone is not set, guessed timezone Europe/Berlin. Please set date.timezone=“Europe/Berlin” in php.ini!
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1; Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_twitter' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Incorrect syntax near ‘'.: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1; Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT * FROMconfigwhere name = N'module_facebook' and value = 1;: SQL Server error: Incorrect syntax near '’.
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT TOP 16 * FROM
(
SELECT sugarfeed.id , sugarfeed.name , sugarfeed.description , sugarfeed.date_entered , sugarfeed.created_by , sugarfeed.related_module , sugarfeed.related_id , sugarfe$
OVER (ORDER BY sugarfeed.date_entered DESC) AS row_number
FROM sugarfeed where ( sugarfeed.related_module in (N’UserFeed’,N’Cases’,N’Leads’,N’Contacts’,N’Opportunities’)) AND sugarfeed.deleted=0
) AS a
WHERE row_number > 0: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_twitter’ and value = 1;
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_twitter’ and value = 1;: SQL Server error: Incorrect syntax near ‘'. Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Incorrect syntax near '’.: SELECT * FROM config where name = N’module_facebook’ and value = 1;
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT * FROM config where name = N’module_facebook’ and value = 1;: SQL Server error: Incorrect syntax near ‘`’.
Wed Sep 3 20:22:20 2014 [7053][1][FATAL] Query Failed: SELECT lhs_module, rhs_module FROM relationships WHERE deleted=0 AND (lhs_module = N’SecurityGroups’ OR rhs_module=N’SecurityGroups’): SQL Server err$

What can i do to resolve these problems? I’ve some problems on installation because similar SQL errors, but CRM are working ok.

Well, after a bit of search, i’ve found the origin of the error.

MSSQL doesn’t accept ` character as table or field qualifier. They only accept " or [].

Because this, all these querys are incorrect for working on a MSSQL environment.

That’s a bug. Please, someone can move the post to correct subforum?

1 Like

@clemente.raposo : I am getting the same error described above in Suite CRM 8. Is there any global configuration that tells Suite CRM to build SQL query without single quotes around fields ? Because MSSQL gives error if field names have quotes.

Error:
[FATAL] SubpanelCustomQueryPort: Error executing custom query Query Failed:SELECT tasks.date_start AS tasks_date_start FROM tasks LEFT JOIN contacts contacts ON tasks.contact_id=contacts.id AND contacts.deleted=0

AND contacts.deleted=0 LEFT JOIN users jt1 ON tasks.assigned_user_id=jt1.id AND jt1.deleted=0

AND jt1.deleted=0 INNER JOIN contacts tasks_rel ON tasks.contact_id=tasks_rel.id AND tasks_rel.deleted=0

where ( tasks.contact_id=N’12374045-f80e-346a-9572-63a606e5df8d’ AND (tasks.status != N’Completed’ AND tasks.status != N’Deferred’)) AND tasks.deleted=0 AND tasks.date_start >= N’2022-12-30’ ORDER BY tasks_date_start ASC LIMIT 1::: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Incorrect syntax near ‘`’.

See here:

https://github.com/salesagility/SuiteCRM/issues/9788