When importing with a simple statement:

SELECT [resortcode]
      ,[resortname]
      ,[resortdescription]
  FROM [database].[dbo].[resort]
GO

everything works fine. But when adding a WHERE clause:

SELECT [resortcode]
      ,[resortname]
      ,[resortdescription]
  FROM [database].[dbo].[resort]
  WHERE [resortcode] IS NOT NULL
GO

i get a error message:

PDOException: SQLSTATE[HY000]: General error: 208 General SQL Server error: Check messages from the SQL Server [208] (severity 16) [(null)]: DELETE FROM {queue} WHERE ([item_id] = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 14 ) in SystemQueue->deleteItem() (line 273 of /var/www/drupal7/modules/system/system.queue.inc).Uncaught exception thrown in session handler.PDOException: SQLSTATE[HY000]: General error: 208 General SQL Server error: Check messages from the SQL Server [208] (severity 16) [(null)]: SELECT 1 AS expression FROM {sessions} sessions WHERE ( ( ([sid] = :db_condition_placeholder_0) AND ([ssid] = :db_condition_placeholder_1) ) ); Array ( [:db_condition_placeholder_0] => 2WZWWf3p-DDBag4F4p58KEhQKatNbhz1r7hHhkUywO4 [:db_condition_placeholder_1] => ) in _drupal_session_write() (line 209 of /var/www/drupal7/includes/session.inc).Uncaught exception thrown in shutdown function.PDOException: SQLSTATE[HY000]: General error: 208 General SQL Server error: Check messages from the SQL Server [208] (severity 16) [(null)] in _batch_shutdown() (line 537 of /var/www/drupal7/includes/batch.inc).

Do you guys have any ideas?

Cheers, Markus

Comments

fool2’s picture

I know this is an old issue, but an FYI-- this error seems to happen when there is a problem with the SQL query and an exception is thrown. I'm assuming something was wrong with the tokens or the SQL query itself in this case-- probably things weren't escaped correctly or some other problem.