Board index » delphi » VarChar(>255) in SQL Srvr 7 REVISED

VarChar(>255) in SQL Srvr 7 REVISED

D5.01, NT4 w/s, SQL SRVR 7

Using TADOStoredProc VarChar sems to be limited to 800 chars or thereabouts,
anything larger raising an exception '...string or binary data will be
truncated...'

SQL Srvr 7 supports VarChar(8k)

Any ideas on this inconsistency?

TIA,

Martin.

 

Re:VarChar(>255) in SQL Srvr 7 REVISED


Make sure you are not using ODBC through ADO, but rather the native OLE DB
provider for MS SQL. AFAIK, the "string or binary... " only gets raised if
somewhere, a piece of data is larger than the field it is beging written to
(MS 6.5 truncated the data).

Also, make sure this isn't happening inside your stored procedure, server
side.

Marcelo Lopez Ruiz
BTW: 8k is just the theoretical limit; you can't index fields that big, and
you can't have two varchar(8k) fields, because the record size is calculated
according to the max size it could get (even if you know you won't ever
surpass the 8k limit  for the whole record).

Quote
Martin Moore <m.mo...@tpg.co.uk> wrote in message

news:8bo355$k5l8@bornews.borland.com...
Quote
> D5.01, NT4 w/s, SQL SRVR 7

> Using TADOStoredProc VarChar sems to be limited to 800 chars or
thereabouts,
> anything larger raising an exception '...string or binary data will be
> truncated...'

> SQL Srvr 7 supports VarChar(8k)

> Any ideas on this inconsistency?

> TIA,

> Martin.

Other Threads