Board index » delphi » Can't read char fields having chars greater than 255

Can't read char fields having chars greater than 255

I have a SQLServer2000 database with a table having char(5000) field (i.e.
DATA).
I want to read data (char sizes greater than 255) from this field using a
standart query.
I put a standart query component (i.e. query1) and using field editor I
created a persistent TStringField (i.e. query1DATA).
Then, using property editor I changed the size property of this TStringField
to 5000.
Although, documentation of TStringField says TStringField is capable of
handling 8192 Chars,
I couldn't read data greater than 255 chars (i.e query1DATA.AsString or
query1DATA.Value).
Is it possible to read data that have sizes greater than 255. What should I
do (different components, pointers etc...)?
 

Re:Can't read char fields having chars greater than 255


Don't know if it is the same here, but we have noticed that older JDBC (for
MS SQL 7) drivers couldn't read beyond 255 characters...

You might want to take a look at the MS knowledge base and look for errors
when using an older driver -- like the BDE. If you're connecting via ADO,
this shouldn't be a problem and I have no clue (perhaps some strange
setting?))...

--
Martijn Tonies
Upscene Productions
http://www.upscene.com

InterBase Workbench - the developer tool for InterBase
http://www.interbaseworkbench.com

Quote
"Senol Pazar" <senolpa...@hotmail.com> wrote in message

news:3ac03f8a_1@dnews...
Quote
> I have a SQLServer2000 database with a table having char(5000) field (i.e.
> DATA).
> I want to read data (char sizes greater than 255) from this field using a
> standart query.
> I put a standart query component (i.e. query1) and using field editor I
> created a persistent TStringField (i.e. query1DATA).
> Then, using property editor I changed the size property of this
TStringField
> to 5000.
> Although, documentation of TStringField says TStringField is capable of
> handling 8192 Chars,
> I couldn't read data greater than 255 chars (i.e query1DATA.AsString or
> query1DATA.Value).
> Is it possible to read data that have sizes greater than 255. What should
I
> do (different components, pointers etc...)?

Re:Can't read char fields having chars greater than 255


Thank you. You are correct about ADO connection. I can read beyond 255
chars, if I change my connection from BDE to ADO. But my program has been
established on entirely BDE connections. Is there a solution for BDE
connections (i.e. BDE or ODBC update or whatever)?   I am currently using
BDE 5.01 with Delphi Enterprise 5.0 and SQLServer2000 on W2K.

With best regards,

Quote
"Martijn Tonies" <m.tonies@clear_this_upscene.com> wrote in message

news:3ac0964a_2@dnews...
Quote
> Don't know if it is the same here, but we have noticed that older JDBC
(for
> MS SQL 7) drivers couldn't read beyond 255 characters...

> You might want to take a look at the MS knowledge base and look for errors
> when using an older driver -- like the BDE. If you're connecting via ADO,
> this shouldn't be a problem and I have no clue (perhaps some strange
> setting?))...

> --
> Martijn Tonies
> Upscene Productions
> http://www.upscene.com

> InterBase Workbench - the developer tool for InterBase
> http://www.interbaseworkbench.com

Re:Can't read char fields having chars greater than 255


No, MS stopped updating DB-lib so no features new to SQL 7 unicode, chars >
255, etc will be supported in the BDE. You need to convert to ADO or do not
use any new features.

Quote
Senol Pazar <senolpa...@hotmail.com> wrote in message

news:3ac09fa6_2@dnews...
Quote
> Thank you. You are correct about ADO connection. I can read beyond 255
> chars, if I change my connection from BDE to ADO. But my program has been
> established on entirely BDE connections. Is there a solution for BDE
> connections (i.e. BDE or ODBC update or whatever)?   I am currently using
> BDE 5.01 with Delphi Enterprise 5.0 and SQLServer2000 on W2K.

Re:Can't read char fields having chars greater than 255


Senol,

Quote
>>Is there a solution for BDE connections

Maybe you can use the text datatype (supported by BDE) instead of
char(5000)?

HTH,
Jim

Re:Can't read char fields having chars greater than 255


actually I changed my char(5000) field to text but this is not the best
solution, I think (due to some problems of dealing memo fields).

Thanks to everbody... :))

Quote
"Jim Elden" <x@yz> wrote in message news:3ac0ff64_1@dnews...
> Senol,

> >>Is there a solution for BDE connections

> Maybe you can use the text datatype (supported by BDE) instead of
> char(5000)?

> HTH,
> Jim

Other Threads