Hi Jakob,
Here is an exerpt from my repository.xml.
<class-descriptor
class="org.waterford.sequencer.data.Studinfo"
table="webspec312.dbo.StudInfo"
>
<field-descriptor id="2"
name="print"
column="Print"
jdbc-type="INTEGER"
/>
</class-descriptor>
'Print' is a reserved keyword in SQL Server. When I change the column
name to StudInfo.Print, i.e. column="StudInfo.Print', I get the same
error. If I use [Print] or "Print" as the column name, then my JDBC
driver throws an error saying that "Column [Print] (or "Print") does not
exist".
Is there a way to force OJB to put column name in quotes or smth like
that?
Thanks.
Oleg
-----Original Message-----
From: Jakob Braeuchi [mailto:[EMAIL PROTECTED]
Sent: Friday, March 05, 2004 10:03 AM
To: OJB Users List
Subject: Re: column name is a reserved keyword
hi oleg,
have you tried to change column names in repository.xml ?
ojb would the use :
select A0.[name], A0.firstName from person A0
jakob
Oleg Lebedev wrote:
> Hi,
>
> I am changing an existing application to use OJB.
> The problem that I ran into is that some of the column names are
> reserved keywords, e.g. 'print'. I need to configure OJB to put all
> column names in brackets, e.g. [print], when retrieving values from
> the database. Otherwise, SQL Server throws a "Reserved keyword"
> exception.
>
> How do I do this?
>
> Thanks.
>
> Oleg
>
> *************************************
> This e-mail may contain privileged or confidential material intended
for the named recipient only.
> If you are not the named recipient, delete this message and all
attachments.
> Unauthorized reviewing, copying, printing, disclosing, or otherwise
using information in this e-mail is prohibited.
> We reserve the right to monitor e-mail sent through our network.
> *************************************
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
*************************************
This e-mail may contain privileged or confidential material intended for the named
recipient only.
If you are not the named recipient, delete this message and all attachments.
Unauthorized reviewing, copying, printing, disclosing, or otherwise using information
in this e-mail is prohibited.
We reserve the right to monitor e-mail sent through our network.
*************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]