Results 1 to 2 of 2

Thread: Importing fails when using MSSql

  1. #1
    chris.kling is offline Junior Member
    Join Date
    Nov 2010
    Posts
    2

    Default Importing fails when using MSSql

    Version: SugarCRM 6.0.3 Professional using XAMPP and MSSQL 2005

    I am currently trying to import a simple csv file into the Accounts module but get the following import error:

    WARNING: [2] mssql_query() [function.mssql-query]: message: Incorrect syntax near ','. (severity 15) on line 265 in file C:\xampp\htdocs\sugarcrm\include\database\MssqlMan ager.php
    WARNING: [2] mssql_query() [function.mssql-query]: Query failed on line 265 in file C:\xampp\htdocs\sugarcrm\include\database\MssqlMan ager.php

    If I'm importing less than 100 records then the records are correctly imported (the error is shown after the first 100 are imported) but if there are more than 100 then the remaining records aren't imported.

    The sugarlog (with debugs) around the error is:
    23/11/2010 4:35:24 PM [18756][1][INFO] Query:UPDATE tracker_sessions SET date_end = '' , seconds = , active = '1', round_trips = 204 WHERE session_id = '5i7q0pota9ev0v3u4tkggp3o96'
    23/11/2010 4:35:24 PM [18756][1][INFO] Query Execution Time:0.0016460418701172
    23/11/2010 4:35:24 PM [18756][1][FATAL] SQL Server error: Incorrect syntax near ','.
    23/11/2010 4:35:24 PM [18756][1][DEBUG] Calling DBManager::disconnect()

    We also have an identical SugarCRM instance on a different server that uses mysql rather than mssql 2005. On this instance the import with the same csv works without errors. However I noticed in the mysql logs the same error occurs regarding the 'UPDATE tracker_sessions' query but the import doesn't bomb out like it does with mssql.

    I've raised a bug (40931) but was wondering if anyone has had any luck with importing using 6.0.3 and mssql?

    NOTE: This is not just restricted to the Account module - it seems to be an issue importing into any module.

  2. #2
    arormoser is offline Junior Member
    Join Date
    Oct 2010
    Posts
    3

    Default Re: Importing fails when using MSSql

    Quote Originally Posted by chris.kling View Post
    Version: SugarCRM 6.0.3 Professional using XAMPP and MSSQL 2005

    I am currently trying to import a simple csv file into the Accounts module but get the following import error:

    WARNING: [2] mssql_query() [function.mssql-query]: message: Incorrect syntax near ','. (severity 15) on line 265 in file C:\xampp\htdocs\sugarcrm\include\database\MssqlMan ager.php
    WARNING: [2] mssql_query() [function.mssql-query]: Query failed on line 265 in file C:\xampp\htdocs\sugarcrm\include\database\MssqlMan ager.php

    If I'm importing less than 100 records then the records are correctly imported (the error is shown after the first 100 are imported) but if there are more than 100 then the remaining records aren't imported.

    The sugarlog (with debugs) around the error is:
    23/11/2010 4:35:24 PM [18756][1][INFO] Query:UPDATE tracker_sessions SET date_end = '' , seconds = , active = '1', round_trips = 204 WHERE session_id = '5i7q0pota9ev0v3u4tkggp3o96'
    23/11/2010 4:35:24 PM [18756][1][INFO] Query Execution Time:0.0016460418701172
    23/11/2010 4:35:24 PM [18756][1][FATAL] SQL Server error: Incorrect syntax near ','.
    23/11/2010 4:35:24 PM [18756][1][DEBUG] Calling DBManager::disconnect()

    We also have an identical SugarCRM instance on a different server that uses mysql rather than mssql 2005. On this instance the import with the same csv works without errors. However I noticed in the mysql logs the same error occurs regarding the 'UPDATE tracker_sessions' query but the import doesn't bomb out like it does with mssql.

    I've raised a bug (40931) but was wondering if anyone has had any luck with importing using 6.0.3 and mssql?

    NOTE: This is not just restricted to the Account module - it seems to be an issue importing into any module.
    Same problem here! Found the solution:

    add this line:

    if ( !isset($monitor->seconds) ) $monitor->seconds = 1;

    after line

    if ( !isset($monitor->active) ) $monitor->active= 1;

    in file modules\Trackers\store\TrackerSessionsDatabaseStor e.php (line 72 in my version)

    Regards

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MSSQL vs MySQL ?
    By jsonewald in forum General Discussion
    Replies: 5
    Last Post: 2010-04-21, 01:08 PM
  2. MSSQL Install fun
    By stew998 in forum Installation and Upgrade Help
    Replies: 1
    Last Post: 2008-07-31, 06:46 AM
  3. Importing of leads fails with memory exhaustion
    By GaryWayneSmith in forum Help
    Replies: 3
    Last Post: 2007-09-24, 08:32 PM
  4. Replies: 2
    Last Post: 2007-08-14, 04:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •