I'm trying to wrap a legacy database using HXTT DBF. One of the tables has a column titled "committed". I'm guessing that the HXTT DBF driver is bombing out because it is treating committed as a reserved word. Can this be properly quoted somehow to avoid this?
I'm using the drivers from 02-Nov-2007.
|
I forgot to mention the exact error:
SQL Error: 172032, SQLState: 2A000
|
>One of the tables has a column titled "committed".
>because it is treating committed as a reserved word.
Yeah You should use [], or "" to enclosing that column.
For instance, select "committed" from aTable.
|
For the record since I am using Hibernate as ORM wrapper the way to quote this is to use ` around the column mapping. For example:
@Id @Column(name="`itmlockey`")
public Long getPK()
{
return pk;
}
public void setPK(Long pk)
{
this.pk = pk;
}
|
>the way to quote this is to use ` around the column mapping.
You can use ". Are you using HXTT's hibernate support package at http://www.hxtt.com/hibernate.html?
|
>> the way to quote this is to use ` around the column mapping.
> You can use ". Are you using HXTT's hibernate support package at
> http://www.hxtt.com/hibernate.html?
I am using the hibernate support package. I'm using ` because I read that if you use the backtick hibernate will substitute database dependent quoting at runtime (presumably dependent on the dialect chosen). Since I'm wrapping a legacy database that I cannot change it would be fine to use " but I want to get in the habit of making the hibernate data layer as database independent as possible.
|