db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Damien Corbishley" <Damien.Corbish...@uk.intervoice.com>
Subject Sybase Documentation
Date Thu, 26 Feb 2004 09:33:29 GMT
 after reading this post about contributing to documentation, I thought
I'd offer this Sybase config for the database urls.
 I stupidly struggled for about an hour trying to connect to sybase.

The documentation always mentions mysql ( which is fine ) and shows
example properties as

  torque.database.createUrl = jdbc:mysql://
 torque.database.buildUrl = jdbc:mysql://
 torque.database.url = jdbc:mysql://
 torque.database.driver = org.gjt.mm.mysql.Driver

So I tried just changing it to

  torque.database.createUrl = jdbc:sybase://
  torque.database.buildUrl = jdbc:sybase://
  torque.database.url = jdbc:sybase://
  torque.database.driver = com.sybase.jdbc2.jdbc.SybDriver 

I can hear the groans already..

Which threw up some very weird errors, and after a bit I ended up with
this working config for Sybase ASE

  torque.database.createUrl =jdbc:sybase:Tds:
  torque.database.buildUrl = jdbc:sybase:Tds:
  torque.database.url = jdbc:sybase:Tds:
  torque.database.driver = com.sybase.jdbc2.jdbc.SybDriver

This is probably blindingly obvious to anyone with a sense of sybase
jdbc access, but maybe it could be put on the site as an example, if
just to save someone like myself an hour or so in the future.


>>> seade@backstagetech.com.au 12:57:07 25 February 2004 >>>
raph@mankin.org.uk wrote:

>As a newcomer to Torque, I would add that the lack of comprehensive
>documentation has been my biggest difficulty. Is there a documentation
>in hand? I think that such a project should even take precedece over
>bugs; if one at least has the wrinkles documented one can work around
them, and
>AFAICT most are not major.
Everyone is welcome to contribute documentation.  Send it to this list, 
the torque-dev list or add it to the wiki.

>To move on ... I encountered some unintuitive behaviour when doing an
>I have a m:n join table. It looks something like
>        create table link (
>                PK integer auto_increment,      -- synthetic primary
>                parent integer references mastertable,
>                child  integer references mastertable
>        )
>Now, I wanted to move a child from one parent to a different parent
i.e. just
>update the 'parent' field in the link. I therefore selected on the
>(parent,child) pair, amended the parent value and called save(). This
is where
>things went wrong.
>Torque tried to save using the same criteria that it had used to
select, but I
>had changed one of the values. It therefore did an INSERT instead of an
>when what I wanted was that it should do an UPDATE using the primary
>The actual behaviour is clearly the intended behaviour. What I am
>is whether this is the correct behaviour. As we know from recent 
>every table must have a primary key otherwise save() does not save.
Given that
>there always is a primary key, should all UPDATEs *always* use that key
and not
>the selection criteria?
>I worked around my problem, but good documentation would have made life
Please post the relevant schema and code.


Scott Eade
Backstage Technologies Pty. Ltd.

To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message