Subject | Re: [IBO] BDE to IBObjects conversion |
---|---|
Author | stanw1950 |
Post date | 2001-12-27T00:20:23Z |
Helen,
Thanks for the quick reply. Your answer solved my problem. I am
running Interbase 6. The problem was with the dialects. I am testing
the bde to ibo at home where I am running dialect 3. At work we are
running dialect 1 with Interbase 6. Without the cast('today' as date)
the query fails with the bde, too. I just haven't run that part of
the program since I changed my dialect here at home (about a week
ago). Strangely, when I ran the query in Marathon while still using
dialect 3 it ran with no errors. The cast will work with both dialect
1 and 3, so I will go through my application and change where needed.
One more query question. In one of my querys (which does an insert),
I use a AsBlob for an input parameter. Does the AsString replace the
AsBlob? Thanks for your help.
Thanks for the quick reply. Your answer solved my problem. I am
running Interbase 6. The problem was with the dialects. I am testing
the bde to ibo at home where I am running dialect 3. At work we are
running dialect 1 with Interbase 6. Without the cast('today' as date)
the query fails with the bde, too. I just haven't run that part of
the program since I changed my dialect here at home (about a week
ago). Strangely, when I ran the query in Marathon while still using
dialect 3 it ran with no errors. The cast will work with both dialect
1 and 3, so I will go through my application and change where needed.
One more query question. In one of my querys (which does an insert),
I use a AsBlob for an input parameter. Does the AsString replace the
AsBlob? Thanks for your help.
--- In IBObjects@y..., Helen Borrie <helebor@d...> wrote:
> At 10:56 PM 26-12-01 +0000, you wrote:
> >I have a lot of queries in my BDE application that do updating.
After
> >converting to IBObjects with greplace, the tquerys are converted
to
> >tiboquerys. When I run them, I get "dynamic sql error - expression
> >not supported". For example, one query has "delete from tablename
> >where recorddate < 'today'-3", and the code has an execsql.
>
> The DSQL error is coming from the database, IBO is merely
delivering it. Have you tested your statements with an interactive
tool like IB_SQL or isql?
>
> What database and version are you using - did you change to a
higher one, for example? If you moved forward from IB 5.x,
expressions involving date literals now work differently...e.g. you
example statement would be
>
> delete from tablename
> where recorddate < (cast ('today' as date) - 3)
>
> But the DATE type has also changed - what was DATE in 5.x is now
TIMESTAMP - although the DSQL error you are getting doesn't appear to
be reporting a type mismatch...
>
> More info please.
>
> regards,
> Helen