提交 991d9a9f 编写于 作者: S serge-rider

#6577 SQL Server: COLUMNPROPERTY is optional

上级 4a5d9631
......@@ -131,7 +131,7 @@ public class SQLServerDataSource extends JDBCDataSource implements DBSObjectSele
try {
JDBCUtils.queryString(session, "SELECT COLUMNPROPERTY(0, NULL, NULL)");
this.supportsColumnProperty = false;
this.supportsColumnProperty = true;
} catch (Exception e) {
this.supportsColumnProperty = false;
}
......
......@@ -336,7 +336,7 @@ public class SQLServerSchema implements DBSSchema, DBPSaveableObject, DBPQualifi
StringBuilder sql = new StringBuilder();
sql.append("SELECT c.*,t.name as table_name,t.schema_id");
if (owner.getDataSource().supportsColumnProperty()) {
sql.append(", COLUMNPROPERTY(c.object_id, c.name, 'charmaxlen') as char_max_length, ");
sql.append(", COLUMNPROPERTY(c.object_id, c.name, 'charmaxlen') as char_max_length");
}
sql.append(", dc.definition as default_definition,ep.value as description\nFROM ")
.append(SQLServerUtils.getSystemTableName(owner.getDatabase(), "all_columns")).append(" c")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册