Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Max 255 characters

Status
Not open for further replies.

mickbrooke

IS-IT--Management
Sep 7, 2000
3
GB
Does anyone know if the following is a bug or am I simple.

I have a table with a varchar (500), I use Enterprise manager to fill it with '#'s.

When I select the field into my sqc (embedded sql) program I get 255 charachters and the rest is spaces.

osql returns all 500 characters, isql returns 255 and query analyser returns 500 if the correct settings are used.


I am using version 3.70 odbc drivers.
Help.

Thanks in advance. [sig][/sig]
 
isql uses DB-Library to communicate with the server. This is still at 6.5 functionality level.
Query Analyser uses the ODBC API with SQL-92 default options.

Take a look in BOL at "isql utility" for some more info.

Is your embedded SQL also using the DB-Library, or are there some ODBC settings to be changed? I'm not sure.... [sig]<p> <br><a href=mailto: > </a><br><a href= home</a><br> [/sig]
 
Cheers for that, it is basically a bug in SQL server. It uses 1 byte to designate the length (i.e. max 255). I have used TEXT instead and it is now OK.

Thanks again. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top