Board index » delphi » Problem: Blob's and RecordCount (MS SQL 6.5)

Problem: Blob's and RecordCount (MS SQL 6.5)

Hello all.

I am using TQuery. Method RecordCount was working well. But when I am adding
two blob columns in table (text type) I am getting  "Table does not support
this operation" exception.

Any help is welcome.

 

Re:Problem: Blob's and RecordCount (MS SQL 6.5)


Hello Alexander,

I wasn't able to reproduce your problem. I added two text type columns in a
SQL 6.5 table and could execute a TQuery.recordCount without problems. I
used D4 and BDE 5.0. There were two records in the TQuery result set.

Besides, I saw a perhaps related problem with MS SQL text fields that I post
in first place for better exposure.

Re:Problem: Blob's and RecordCount (MS SQL 6.5)


Quote
Christophe Dary wrote in message <6piuoq$a...@forums.borland.com>...
>Hello Alexander,

>I wasn't able to reproduce your problem. I added two text type >columns in

a SQL 6.5 table and could execute a TQuery.recordCount >without problems. I
used D4 and BDE 5.0. There were two records in >the TQuery result set.

Thank's Christophe , but what about Delphi 1/BDE 2.52?

Re:Problem: Blob's and RecordCount (MS SQL 6.5)


Quote
Alexander Pankov wrote in message <6pi73l$9...@forums.borland.com>...
>Hello all.

>I am using TQuery. Method RecordCount was working well. But when I am
adding
>two blob columns in table (text type) I am getting  "Table does not support
>this operation" exception.

I think, that you get the same error with only one blob (or memo - Text)
field added. The problem can be solved that you catch a message (try, On
error) and in case of error move to the end of dataset (Last) and then back.
After this operation RecordCount returns a corect answer.

brane

Re:Problem: Blob's and RecordCount (MS SQL 6.5)


Brane <branko.safa...@siol.net> wrote in article
<6q4uvf$4...@forums.borland.com>...
Quote

> Alexander Pankov wrote in message <6pi73l$9...@forums.borland.com>...
> >Hello all.

> >I am using TQuery. Method RecordCount was working well. But when I am
> adding
> >two blob columns in table (text type) I am getting  "Table does not
support
> >this operation" exception.

> I think, that you get the same error with only one blob (or memo - Text)
> field added. The problem can be solved that you catch a message (try, On
> error) and in case of error move to the end of dataset (Last) and then
back.
> After this operation RecordCount returns a corect answer.

> brane

Kidding?
This may work with very small datasets. In general SQL server does not know
the exact number of rows it will return, so RecordCount works accurately
only with local tables.

Also, if you move to last and then back on a recordset with blob, you'll
get "Invalid blob handle in record buffer", if there are more records than
blobcachesize setting (20,40,100).

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

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

Other Threads