Hi all,

 just what to share with you the difficulties that i had when trying to use
torque with Sybase ASA 8.0.

The first thing that should be changed was mentined by Jeff Brekke (than
you ) when using auto increment fields is the table:

"
I believe the default for auto increment is a non-native
one and the db.props file for Sybase must be updated to
include the IDENTITY keyword:

templates/sql/base/sybase/db.props

<snip>

#
# This is the autoincrement value if using native methods for
# incrementing keys.  Most likely IDENTITIY wrt Sybase ASE.
# Leaving the value blank should be used when Turbine's IDBroker
# is used to autoincrement keys.
#
# Default: [blank]
#
AUTOINCREMENT = IDENTITY

#
# If true, the NOT NULL values will not be printed in generated
# SQL files if the column is set to autoincrement.  Should be true
# when the internal IDENTITY attribute ( above ) is used in a column
# for autoincrementing keys.
#
# Default: false
#
removeNotNullWithAutoIncrement = true

</snip>"

The second problem was with the jdbc driver of sybase (jconnect 5.5) :

- the resultsetmetadata.isReadOnly(columnNumber) returns true when it should
return false
so village will generate empty insert statements: insert into table_name
(   ) values (  )
- the resultsetmetadata.getTableName(columnNumber) in some cases throws
exception (this is
handled well by village), and other times returns the table name as
'databasename.tablename'
in this case village will throw this: "This schema represents several
tables."

The workaround for this was to modify the village sources to always return
false in
com.workingdogs.village.Column.readonly() method
and not to read call the resultsetmetadata.getTableName(columnNumber)  at
all
in com.workingdogs.village.Column.populate() method.

Is anybody else using Torque with Sybase? If yes how did you solve the
problems mentioned above?


Thank you,

Andras Balogh - programmer
http://www.reea.net


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to