Skip to content
This repository has been archived by the owner on Sep 15, 2022. It is now read-only.

Commit

Permalink
Ensure column headers and the insert row are shown in the edit grid w…
Browse files Browse the repository at this point in the history
…hen no rows exist in the table being editted, per Bob Pawley.

git-svn-id: svn://svn.pgadmin.org/branches/REL-1_6_0_PATCHES@5740 a7884b65-44f6-0310-8a51-81a127f17b15
  • Loading branch information
dpage committed Dec 5, 2006
1 parent eba37ac commit 32a29bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG
Expand Up @@ -35,6 +35,9 @@ Changes

Date Dev Ver Change details
---------- --- ----- --------------
2006-12-05 DP 1.6.2 Ensure column headers and the insert row are shown in the
edit grid when no rows exist in the table being editted,
per Bob Pawley.
2006-12-05 DP 1.6.2 Restore dialog sizes correctly.
2006-12-04 DP 1.6.2 Build against PostgreSQL 8.2 on Windows
2006-12-01 DP 1.6.2 Fix some oddities in the way current per-table vacuum
Expand Down
2 changes: 1 addition & 1 deletion src/frm/frmEditGrid.cpp
Expand Up @@ -877,7 +877,7 @@ void frmEditGrid::Go()
}

// Check we have access
if (connection->ExecuteScalar(wxT("SELECT 1 FROM ") + tableName) != wxT("1"))
if (connection->ExecuteScalar(wxT("SELECT count(*) FROM ") + tableName + wxT(" WHERE false")) == wxT(""))
return;

SetStatusText(_("Refreshing data, please wait."), 0);
Expand Down

0 comments on commit 32a29bf

Please sign in to comment.