Skip to content

Commit

Permalink
Removed SQL Server-specific code dealing with spaces in table names.
Browse files Browse the repository at this point in the history
  • Loading branch information
johncurrier committed Apr 25, 2006
1 parent ea926e0 commit 8f4f53e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/net/sourceforge/schemaspy/model/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -553,13 +553,10 @@ protected int fetchNumRows(Database db, String clause) throws SQLException {
sql.append('.');
}

// SQL Server can have spaces in table names and wants []'s around them
boolean spaceInName = getName().indexOf(' ') != -1;
if (spaceInName)
sql.append('[');
String escape = db.getMetaData().getIdentifierQuoteString();
sql.append(escape);
sql.append(getName());
if (spaceInName)
sql.append(']');
sql.append(escape);

try {
stmt = db.getConnection().prepareStatement(sql.toString());
Expand Down

0 comments on commit 8f4f53e

Please sign in to comment.