Board index » delphi » SQL Server Bug or BDE Bug?

SQL Server Bug or BDE Bug?

This is not cool.
I tried to change a couple of programs over to Delphi 4.0 C/S from 3.0 C/S
and i get this error message when I try to open queries that return
datasets:

"Operation not applicable"

My workaround is this:

             repeat
               try
                  query1.open;
                  break;
               except
               on e:exception do
                  if pos('Operation not applicable',e.message) = 0 then
raise;
               end;
             until true;

this workaround solves the problem... but have you EVER seen anything so
ugly?  ( the exception fires about 1 time in 4, so the repeat saves the
day...)

Am I missing something fundamental here?
Is there a new parameter setting in D4 that I need to know about?
(ie: Is this a real bug or am I an idiot)

thanks for your time.
Jason Leach

 

Re:SQL Server Bug or BDE Bug?


I am using D4 + SQL Server 6.5 Service pack 4. I never noticed what you
describe.

Does it occurs for every query that return dataset ? Could you send an
example ?

Re:SQL Server Bug or BDE Bug?


Maybe you can show the query to know what could be the problem...

Cheers

Quote
Jason Leach wrote:

> This is not cool.
> I tried to change a couple of programs over to Delphi 4.0 C/S from 3.0 C/S
> and i get this error message when I try to open queries that return
> datasets:

> "Operation not applicable"

> My workaround is this:

>              repeat
>                try
>                   query1.open;
>                   break;
>                except
>                on e:exception do
>                   if pos('Operation not applicable',e.message) = 0 then
> raise;
>                end;
>              until true;

> this workaround solves the problem... but have you EVER seen anything so
> ugly?  ( the exception fires about 1 time in 4, so the repeat saves the
> day...)

> Am I missing something fundamental here?
> Is there a new parameter setting in D4 that I need to know about?
> (ie: Is this a real bug or am I an idiot)

> thanks for your time.
> Jason Leach

  vcard.vcf
< 1K Download

Re:SQL Server Bug or BDE Bug?


I am using SQL 6.5 sp4 as well.
These are simple queries, with sql statements added at run time:
such as:

with q1 do
begin
  SQL.Clear;
  SQL.add('select name from syscolumns where id = object_id(''' + xname +
''')');
  prepare;
  open;   // no different when setting active := true;
end;

xname is a local string variable containing the name of a table object that
I already know exists.
When I say this works three times out of four, I mean that it works
ALWAYS... but generates that exception one time out of four.  Ideas?.
Using parameters is not necessarily the solution for me, as I tend to use
one query object and rewrite my SQL statements at runtime. (based on runtime
conditions)
This is not a new app. this app was born with D1 and ported to D2,D3 and now
D4.
I was not changing functionality, I was just recompiling an existing app.
Everything worked just fine in D3, and that exception was not generated.

Re:SQL Server Bug or BDE Bug?


Just out of interest, are you using Unidirectional queries? I found that I
would get the 'Operation not applicable" message if certain conditions are
met with MSSQL 6.5 using Unidirection queries...
Quote

>Workaround?
>This only hides the exception and possibly generates other error (ie query
>is not open)
>1. BDE may be unstable.
>2. Local SQL really does not support some operations (check databasename)
>3. the same applies if RequestLive=true
>4. you may have bug in SQL statement...

>--
>-------------------------
>Regards,
>Robert

>Remove both qwe when replying.
>MailTo: robert.qwece...@eunet.qwe.si

Other Threads