I changed the SampleApp of examples-basic accordingly. The examples also
were successfull with postgres 9.0.4 



On [Mon, 10.10.2011 23:35], Francis De Brabandere wrote:
> Sounds like I missed/misunderstood something there when I create the
> driver. Go ahead and commit the change since it fixes a bug. (skipping
> a column is not the correct solution anyway, should have thrown an
> unsupportedexception or so)
> 
> On Mon, Oct 10, 2011 at 11:19 PM, Eike Kettner <[email protected]> wrote:
> > Hi!
> >
> > I just ran the basic and advances examples on my linux machine with
> > postgresql 8.4.8, mysql 5.1.49 and derby 10.4.2.0.
> >
> > All went well except for the basic example with postgresql. Here is the
> > stack trace:
> >
> > org.apache.empire.exceptions.InvalidArgumentException: Invalid Argument -1 
> > for parameter index.
> >        at org.apache.empire.db.DBReader.getValue(DBReader.java:370)
> >        at org.apache.empire.db.DBRecordData.getString(DBRecordData.java:193)
> >        at org.apache.empire.db.DBRecordData.getString(DBRecordData.java:206)
> >        at 
> > org.apache.empire.samples.db.SampleApp.queryRecords(SampleApp.java:419)
> >        at org.apache.empire.samples.db.SampleApp.main(SampleApp.java:135)
> >
> >
> > The problem is line 422 of SampleApp.java, it says
> >
> >  reader.getString(PHONE_EXT_NUMBER)
> >
> > It seems that the query depends on the dbms. In line 380-386, the
> > "column" PHONE_EXT_NUMBER is only added to the query if it's _not_
> > postgresql. The comment states, that this is due to posgresql not
> > supporting substring. I'm pretty sure, that postgre supports this (see
> > http://www.postgresql.org/docs/8.1/static/functions-string.html) So I
> > bravely removed the if condition and the example ran successfully.
> >
> > Are there any other reasons for this if-condition? I'd then say, we
> > should remove it, since substring is supported by postgre?
> >
> > Regards,
> > Eike
> >
> >
> > On [Mon, 10.10.2011 00:28], Rainer Döbele wrote:
> >> Hi folks,
> >>
> >> I am happy to announce that I have almost completed another major task 
> >> that has long been overdue: The reduction of duplicate code for DDL 
> >> generation.
> >>
> >> Doesn't sound like much, but this issue has been quite a bit of work and 
> >> hence took me quite a bit of time.
> >> I have tried my best to achieve the same results as before by comparison 
> >> of the DDL outcome.
> >> But I have not been able to make real database tests against the following 
> >> databases: MySQL, Postgre, H2, Derby.
> >> However I have tested Oracle, SQLServer and HSQLDB.
> >>
> >> Is anyone able to test it with any of the remaining databases by running 
> >> at least the basic and the advanced sample?
> >>
> >> Cheers,
> >> Rainer
> >>
> >
> > --
> > email: [email protected]   https://www.eknet.org  pgp: 481161A0
> >
> 
> 
> 
> -- 
> http://www.somatik.be
> Microsoft gives you windows, Linux gives you the whole house.
> 

-- 
email: [email protected]   https://www.eknet.org  pgp: 481161A0

Reply via email to