× Welcome to the ToolsJX forum!

MSSQL Views Not Showing

  • cbrock
  • cbrock's Avatar Topic Author
  • Offline
  • New Member
  • New Member
6 years 8 months ago #3509


Just to give an update on my previous post, I made a minor edit to the component code to bypass this issue.

In the file /components/com_grid/GridBuilder.php, I made a slight change to the code on line 585.


$q = "SELECT DISTINCT ".$this->dbo->quoteName($column->columnName)." FROM ".$this->dbo->quoteName($this->_config->tableName)." ORDER BY ".$this->dbo->quoteName($column->columnName)." ASC LIMIT 0, 100";

$q = "SELECT DISTINCT ".$this->dbo->quoteName($column->columnName)." FROM ".$this->dbo->quoteName($this->_config->tableName)." ORDER BY ".$this->dbo->quoteName($column->columnName)." ASC";

Basically, I just removed LIMIT 0, 100 from the SQL statement since that is not the correct syntax for TSQL (uses TOP 1 SELECT * or so on instead). Obviously, this wouldn't be a permanent fix since there probably should be a case statement based on the server type (mysql or mssql or oracle, etc.) but it works for what we're doing.

Hope this helps anyone else running into a similar issue.

Last edit: 6 years 8 months ago by cbrock.

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.167 seconds

Contact Us

Contact us on Facebook