I am receiving the following error when trying to import a .csv file that was exported from the same module on a different site. This is a Drupal 7 installation using Windows 7 and MS SQL 2008r2. I have also attempted to use a .txt file with the same information and by populating the textarea directly.
An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /subsite/batch?render=overlay&id=7&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42000]: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near 'LIMIT'.: SELECT t.tid FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} h ON t.tid = h.tid WHERE :name LIKE LOWER(t.name) AND {t.vid} = :vid ORDER BY {t.tid} ASC LIMIT 1; Array ( [:name] => 3d animation schools [:vid] => 4 ) in taxonomy_csv_term_find() (line 92 of \wwwroot\sites\all\modules\taxonomy_csv\taxonomy_csv.term.api.inc).
Comment | File | Size | Author |
---|---|---|---|
#5 | 1178366.taxonomy_csv.patch | 2.05 KB | dagmar |
Comments
Comment #1
rickmanelius CreditAttribution: rickmanelius commentedSame, but with the dev branch.
Comment #2
rickmanelius CreditAttribution: rickmanelius commentedIt seems in the above that there is an inconsistent usage of whether the drupal database tables use a prefix (such as drupal_).
Comment #3
Daniel_KM CreditAttribution: Daniel_KM commentedHi,
I don't have any expensive Microsoft product, so I can't check your issue.
It looks like this error is similar of this one (double prefix). I've just committed the patch on 7.x-5.x branch. Could you check if it fixes your problem? Thanks,
Daniel Berthereau
Infodoc & knowledge manager
Comment #4
Daniel_KM CreditAttribution: Daniel_KM commentedComment #5
dagmarI think the problem is related to the LIMIT added after the ORDER BY.
Sql Server uses TOP(1) instead of LIMIT 1.
The attached patch replaces the query by a similar one using the dbtng api, that handles the limit properly.
Comment #6
Daniel_KM CreditAttribution: Daniel_KM commentedThanks,
Your patch has been committed.
Sincerely,
Daniel Berthereau
Infodoc & Knowledge management
Comment #8
bob.foks CreditAttribution: bob.foks commentedIt must be connected with sql database file corruption.
For realizing successful imporing MS SQL database make use next software http://www.recoverytoolbox.com/sql.html