The db.props information I have was from Daniel Dittmar from Sap. He's
supposed to be the person that made the JDBC drivers for Sap, so I just
took his word for it. Plus, LONG BYTE is what I'm using in all my app's
I've developed with OJB and it works great. The DISTINCT part we weren't
sure of. He said it wasn't supported and the Sapdb site says the same
thing. Why would LONG RAW be better?
Thank You,
Justin A. Stanczak
Web Manager
Shake Learning Resource Center
Vincennes University
(812)888-5813
"J. Russell
Smyth" To: Turbine Torque Developers
List <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]> cc: [EMAIL PROTECTED],
[EMAIL PROTECTED]
Subject: Re: [Bug] [Fwd: ALTER error]
09/02/02 12:34 AM
This can be fixed with the attatched primarykey.vm, which goes
<torque-src>/templates/sql/base/sapdb/
I have been holding this change/fix untill I could run the tests, which
at this point will not run for me. However, this change, and one I made
similar to the previous post for the db.props file, are necessary to use
torque with sapdb.
also, I belive the following are more accurate for db.props
VARBINARY = LONG RAW
LONGVARBINARY = LONG RAW
DISTINCT = DISTINCT
The first two are from an email list message from one of the sapdb team
members.
Russell
On Sun, 2002-09-01 at 13:31, Thomas Mahler wrote:
> Hi,
>
> here is a Bug report from an OJB / SAPDB user.
>
> The schema.xml contains the following entry:
>
> <table name="PERSON_PROJECT">
> <column name="PERSON_ID"
> required="true" primaryKey="true" type="INTEGER"/>
> <column name="PROJECT_ID"
> required="true" primaryKey="true" type="INTEGER"/>
> <column name="ROLENAME" type="VARCHAR" size="20"/>
> </table>
>
> During excecution of the generated DDL the following error occurs:
> [torque-insert-sql] Failed to execute: ALTER TABLE PERSON_PROJECT ADD
> PRIMARY KEY ("PERSON_ID,PROJECT_ID")
> [torque-insert-sql] com.sap.dbtech.jdbc.exceptions.DatabaseException:
> SAP DBTech SQL: [-4005] (at 46) Unknown column name:PERSON_ID,PROJECT_ID
>
> The quotes around PERSON_ID,PROJECT_ID seem to be the troublemakers...
>
> Is this a known problem?
> Or must compund PKs be defined in a different way?
>
> cheers,
> Thomas
>
>
>
> -------- Original Message --------
> Subject: ALTER error
> Date: Sun, 1 Sep 2002 15:08:51 -0500
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
>
> Here's the problem I'm having with the SQL that Torque has generated. The
> quotes are causing Sapdb to not read the table name right. I've attached
> the output file. It's way down at the end of the file. If you look you
will
> see all the errors to do with the ALTER statement.
>
> Example:
>
> [torque-insert-sql] Failed to execute: ALTER TABLE PERSON_PROJECT ADD
> PRIMARY KEY ("PERSON_ID,PROJECT_ID")
> [torque-insert-sql] com.sap.dbtech.jdbc.exceptions.DatabaseException:
> SAP DBTech SQL: [-4005] (at 46) Unknown column name:PERSON_ID,PROJECT_ID
>
> As you can see it doesn't under stand the column names. If you remove the
> quotes around the PERSON_ID and PROJECT_ID this statement will execute
> fine. Or you can put single quotes around each name and it will work. You
> will also see in the output there's errors about the drop table. That's
all
> ok, because the tables weren't created yet. I think you already knew that
> though. So you can see it's not a big problem, but I'm not sure how easy
it
> is to make Torques stop using quotes. On this example there's two
> parameters in the ALTER statement and both are within the same quotes. I
> would think that would be wrong for a lot of databases. So there's the
> problem. I've sent it to the developer list, but everyone was to busy to
> reply. I'm running OJB now in a project and everything works great. This
> just seems to apply to the generation of tables through Torque, but I'm
> sure this will cause a lot of confusion for people trying to setup OJB on
> Sapdb. Hope we can get this fixed. Let me know what else I can do to help
> solve this problem.
>
> (See attached file: ojb-sapdb-errors.txt)
>
>
> Thank You,
>
> Justin A. Stanczak
> Web Manager
> Shake Learning Resource Center
> Vincennes University
> (812)888-5813
>
> ----
>
> --
> To unsubscribe, e-mail: <
mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>