Drupal 7 on Windows running MS SQL.

Trying to add a "Global: Block area" field to a view.

When I try to add a field within a view, I get the following errors:

"An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows:
Path: http://test/www/admin/structure/views/ajax/add-item/
menu_test/page/field
StatusText: Service unavailable (with message)
ResponseText:"

Recent Log File entry shows:
PDOException: SQLSTATE[22018]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Conversion failed when converting the nvarchar value 'main' to data type int.: SELECT b.bid, b.[module], b.delta, b.theme, b.status, b.weight, b.region, b.custom, b.visibility, b.pages, b.cache, b.css_class, b.icon, b.title, c.[info] AS [info] FROM block b LEFT OUTER JOIN block_custom c ON b.delta = c.bid AND b.[module] = :module WHERE ( ([b].[module] != :db_condition_placeholder_0) ) ORDER BY b.[module] ASC; Array ( [:db_condition_placeholder_0] => views [:module] => block ) in views_handler_field_block->options_form() (line 38 of C:\inetpub\wwwroot\www\sites\all\modules\views_block_area\views\handlers\views_handler_field_block.inc).

It would appear the "LEFT OUTER JOIN block_custom c ON b.delta = c.bid" portion of the SQL statement is incorrect on line 30 of the \sites\all\modules\views_block_area\views\handlers\views_handler_field_block.inc file.

b.delta is a VARCHAR(32) field and c.bid is an INT(11) field.

This appears to be prompting the error message "Conversion failed when converting the nvarchar value '???' to data type int."

Should the SQL join be on the b.bid and c.bid fields? "LEFT OUTER JOIN block_custom c ON b.bid = c.bid"

Thanks

Comments

rdellis87 created an issue.