Subject RE: [IBO]Error returned due to slack syntax in 4.7.16
Author Paul Hope
Jason,

I cant seem to produce a sample - this is very strange.

If I go to my app form, place a new TIB_Query on it, connect it to the main
IB_Connection, paste in the SQL and click prepare I get the access
violation.

If I create a new app with new IB_Connection, default transaction and query,
connect to the same database, paste in the SQL click prepare - its OK !

On closer examination of the IB_connections the existing one has SQLDialect
3 (the databases are Dialect 1). The test app has SQLDialect 1, if I
change it to 3 it changes back to 1 when I connect or prepare the query.

Having changed the dialect in the main app to 1 it all works fine.

The remaining mystery is how the main app managed to remain on SQLDialect 3.

In terms of the original question of improving the returned error message
for bad syntax it looks like this is a bad example!

Regards
Paul
>
> > Following on from previous discussion about needing to
> tighten up SQL
> > syntax for this release I was wondering if it would be possible to
> > improve the error reporting on this.
> >
> > My latest problem is an access violation when preparing the
> following
> > SQL in a TIB_Query (code or designer)
> >
> > SELECT d.ICC_NO,d.invoice_number,d.customer_ac_no,
> > d.company,d.order_number
> > FROM ICC_HEADER D,CUSTOMER C,vatcodes v WHERE d.vat_class=v.vat_code
> > AND D.company=c.co
> > AND D.CUSTOMER_AC_NO = C.ACCOUNT_NO
> > AND d.company='A'
> > AND d.invoice_number<=16000
> > AND d.invoice_number>=16000
> > AND bin_and(STATUS,3670016) in (0,2621440) ORDER BY d.icc_no ASC
> >
> > The problem is fixed by putting the d. alias in front of
> STATUS. Even
> > a catch-all like 'Incorrect Syntax' would do?
>
>
> Please send me a simple sample app with a DDL script to make
> the database.
> Test it once to make sure the error is still there.
>
> With this I should be able to quickly find out what is going
> on and fix it.
>
> Jason Wharton
>
>
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> !
> Yahoo! Groups - Join or create groups, clubs, forums &
> communities. Links
>
>
>
>