Revered Luminaries of the OJB Community:

First off, let me say that I'm FORCED to access data from a table provided by a client that utilizes column names with spaces, dashes, and forward slashes. Again NOT my choice or design - just wanted to get that out of the way! 8^) These guys are M$ zombies, what can I say!?

I'm using db-ojb-1.0.3 with jtds-1.0.3 connecting to MS Sql Server 2000.
(BTW... the application is also connecting to databases on PostgreSQL on a Linux server (my choices) which works great!)


The "closest" I can get to a successful query is to enclose the column names in square brackets within the repository file. Note that the table name also contains a space and enclosing it in square brackets seems to work fine.

The exceptions I'm seeing are:

org.apache.ojb.broker.PersistenceBrokerSQLException: SQLException during the execution of the query (for com.ascenditsolutions.lca.model.vo.rio.Lerg7VO): Invalid column name 'eff'

The related repository definition:

       <field-descriptor
           id="4"
           name="effDate"
           column="eff date"
           jdbc-type="TIMESTAMP"
       />

OK, I'm not using "eff date" at this point in time, let's skip it for now and see how far we get... not far enough:

org.apache.ojb.broker.PersistenceBrokerException: Error reading class type: com.ascenditsolutions.lca.model.vo.rio.Lerg7VO from result set, current read field was vCoord

With repository definition:

       <field-descriptor
           id="10"
           name="vCoord"
           column="v-coord"
           jdbc-type="VARCHAR"
           length="5"
       />

Getting "v-coord" is essential.

Now what?

I'm stuck. If someone has a suggestion on what I need to do, I'd really appreciate it. Otherwise, I'm considering utilizing a view with aliases for the malignant columns - will this work?


Thanks! John A simple and humble OJB User.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to