db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Dudziak (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DDLUTILS-183) Spaces in column names or table names cause an exception
Date Fri, 31 Aug 2007 16:47:18 GMT

    [ https://issues.apache.org/jira/browse/DDLUTILS-183?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524134
] 

Thomas Dudziak commented on DDLUTILS-183:
-----------------------------------------

Did you enable delimited-identifier-mode ? Databases only allow spaces, sql keywords etc.
to be used with table names, column names, etc. when delimited identifiers are used. 

> Spaces in column names or table names cause an exception
> --------------------------------------------------------
>
>                 Key: DDLUTILS-183
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-183
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core (No specific database)
>         Environment: Discovered in MSS SQL Server
>            Reporter: Brian Devaney
>            Assignee: Thomas Dudziak
>         Attachments: HandleSpaces.patch
>
>
> A database table with spaces in the column name or a table name with spaces in it will
cause an exception to be thrown when and alter script is run on that database.  This exception
was generated when a table named 'flow queue 08-31-07' was discovered.
> java.sql.SQLException: Incorrect syntax near 'queue'.
> 	at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:364)
> 	at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2778)
> 	at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2214)
> 	at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:597)
> 	at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:343)
> 	at net.sourceforge.jtds.jdbc.JtdsStatement.executeQuery(JtdsStatement.java:1184)
> 	at org.apache.ddlutils.platform.JdbcModelReader.determineAutoIncrementFromResultSetMetaData(JdbcModelReader.java:1068)
> 	at org.apache.ddlutils.platform.mssql.MSSqlModelReader.readTable(MSSqlModelReader.java:105)
> 	at org.apache.ddlutils.platform.JdbcModelReader.readTables(JdbcModelReader.java:516)
> 	at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:472)
> 	at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
> 	at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1962)
> Surrounding the table or the column with [ ] will solve the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message