Board index » delphi » Delphi 3.0 + MSSQL 7.0 cannot interpret Varchar for more than 255 characters !!!!

Delphi 3.0 + MSSQL 7.0 cannot interpret Varchar for more than 255 characters !!!!

My application environment is Delphi 3.0 and connect MSSQL 7.0.
I have created a table with the attribute Varchar(5000). However,  I found a
TTable object will always tranlate the field length from 5000 to 136, ie.
5000 mod 256.
Can anyone kindly to suggest a solution to me. Thanks.
 

Re:Delphi 3.0 + MSSQL 7.0 cannot interpret Varchar for more than 255 characters !!!!


Quote
SNA News wrote:

> My application environment is Delphi 3.0 and connect MSSQL 7.0.
> I have created a table with the attribute Varchar(5000). However,  I found a
> TTable object will always tranlate the field length from 5000 to 136, ie.
> 5000 mod 256.
> Can anyone kindly to suggest a solution to me. Thanks.

I might suggest using a Memo field in your table, then use a datatype of
TEXT for SQl Server.  To get or set the text in the MS SQL table, use

FieldByName('MyMemoField').AsMemo;

HTH

--

                   \|||/
                   /'^'\
                  ( 0 0 )
--------------oOOO--(_)--OOOo--------------
. Reid Roman                              .
. Delphi Programmer                       .
. TVisualBasic:=class(None)               .
. May the Source be With You              .
-------------------------------------------
. Auto-By-Tel (http://www.autobytel.com)  .
. Irvine, CA U.S.A                        .
. E-Mail : rkroman (at) home (dot) com    .
-------------------------------------------

Re:Delphi 3.0 + MSSQL 7.0 cannot interpret Varchar for more than 255 characters !!!!


Quote
>My application environment is Delphi 3.0 and connect MSSQL 7.0.
>I have created a table with the attribute Varchar(5000). However,  I found a
>TTable object will always tranlate the field length from 5000 to 136, ie.
>5000 mod 256.

Microsoft did not update their DB-Lib interface (which the Borland SQL
Links use) to support the new SQL 7.0 data types.  Unfortunately, this
is to be expected.  Every new version seems to bring a new preferred
interface: DB-Lib, ODBC, ADO, etc.

-Mike

Re:Delphi 3.0 + MSSQL 7.0 cannot interpret Varchar for more than 255 characters !!!!


Please try my component http://www.zhanjiang.gd.cn/home/jzy
It support it.

Quote
SNA News wrote in message <7bloua$3...@forums.borland.com>...
>My application environment is Delphi 3.0 and connect MSSQL 7.0.
>I have created a table with the attribute Varchar(5000). However,  I found
a
>TTable object will always tranlate the field length from 5000 to 136, ie.
>5000 mod 256.
>Can anyone kindly to suggest a solution to me. Thanks.

Other Threads