ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Abator Tool with Sybase
Date Thu, 17 Aug 2006 14:58:40 GMT
Oh right - I forgot that Sybase was sort of like SQL Server in this regard.
The SQL terms for this are catalog.schema.tableName.

Try specifying <table catalog="Database" tableName="TableName"/> with no
extra dots.  Abator will add the extra dot for you if you do it like this.

Jeff Butler



On 8/17/06, Wordsworth, Warren (Mission Systems) <Warren.Wordsworth@ngc.com>
wrote:
>
>  Jeff,
>   As to your question, yes.  It was able to find the table with the
> leading dot '.' placed in front of it.  Like I had mentioned earlier, Sybase
> refers to Tables as Database.DatabaseOwner.TableName.  When I placed the
> leading '.', this most likely caused the syntax DatabaseName..TableName to
> be passed which works (Database Owner can be left blank in many cases).
>
>  Warren Wordsworth
> Northrop Grumman Mission Systems
> MIDB Software Engineer
> (703) 988-8371
> Warren.Wordsworth@ngc.com
>
> -----Original Message-----
> *From:* Jeff Butler [mailto:jeffgbutler@gmail.com]
> *Sent:* Thursday, August 17, 2006 10:01 AM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: Abator Tool with Sybase
>
> Hi Warren,
>
> The problem with the underscore in the table name is probably happening
> because underscore is an SQL wildcard character.  There's probably something
> I can do about that problem.  I'll look into it.
>
> I don't understand the other problem.  Are you saying that <table
> tableName="FAC"/> did not find the table, but that <table tableName=".FAC"/>
> did?
>
> Jeff Butler
>
>
>
>
> On 8/17/06, Wordsworth, Warren (Mission Systems) <
> Warren.Wordsworth@ngc.com> wrote:
> >
> >   Hello,
> >   I've been looking into using iBATIS for our object mapping and the
> > ABATOR tool to auto-generate the DAO and SQL mapping for an existing
> > database hosted on a Sybase server.  I was able to successfully ABATOR to
> > run for a table name that was a single word ( i.e. FAC) but when there
> > was an under-score in the name(i.e. FAC_AKA), an error message is
> > displayed that the table cannot be found.  Also, in order for the single
> > word table names to be found, I had to put a period in from of the table
> > name (.FAC).  This forces the syntax DBNAME..TABLENAME to be sent to the
> > DBMS.
> > Warren Wordsworth
> > Northrop Grumman Mission Systems
> > MIDB Software Engineer
> > (703) 988-8371
> > Warren.Wordsworth@ngc.com
> >
>
>

Mime
View raw message