db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Dovlecel" <alexandru.dovle...@siemens.com>
Subject RE: MSSQL problems with reserved words
Date Wed, 31 Mar 2004 09:39:48 GMT
Hi K,

I have to stick to the database design specified by other team that is using
.NET. For now, I did what you recomended me in this mail. But this is until
I fix this problem.

I did not try to use the JDBC 2 SChema feature but I doubt it will work. I
might try it later. For now I try to change the templates for generating the
SQL. But there is also the problem of the SELECT clause. I cannot have a
SELECT * FROM SCHEMA. I think this could be solved by setting the TABLE_NAME
= "[SCHEMA]". I hope it will not mess up other Torque functionality.

New ideas?

Thanks for the answer,
Alex

> Hi Alex,
> Why table name schema is so important for you? Can you name a
> table somehow else, and if you need class named Schema,
> then specify a javaName="Schema" in your my-schema.xml.
>
> Regards,
> Kostya
>
> Alexandru Dovlecel wrote:
>
> > Hi all,
> >
> > Pls need help ASAP. I have a database that contains tables
> that are reserved
> > words for mssql. E.g. one table is called SCHEMA. When I
> generate the code
> > from my-schema.xml, it generates the my-schema.sql file.
> When running the
> > sql file in the mssql I get an error: SCHEMA keyword not
> expected after
> > CREATE TABLE (or something like this). I can do this by generating
> > CREATE TABLE [SCHEMA]. But if I put the table name as
> "[SCHEMA]" then the
> > primary key triggers are not correct (e.g. [SCHEMA]_PK is
> not a valid name).
> >
> > How can I overcome this problem? Does anyone have some patched mssql
> > templates for generating the sql and the OM classes?
> >
> > Any suggestions? Pls help.
> >
> > Thanks alot,
> > Alex
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org


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


Mime
View raw message