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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comments field declared 500 varchar only showing 256 chars

Status
Not open for further replies.

061178

Programmer
Jul 7, 2005
41
GB
Hi,

I have a column in a table declared as a T_description (500) which is a varchar (500). In the application I save my record which updates the column with 350 chars (for e.g.) the update works and when select the column in query analyser the column has been updated. In the app only 256 chars are showing in the field. This is PB 9, SQL server 2000 using ODBC to connect to db. It is not the dw limit of field as this is 500. Is it something to do with the data types in odbc? Do ODBC varchar columns have a limit of 256 characters. Can I change the mapping (i.e. map SQL Server VARCHAR to ODBC Text, instead of SQL Server VARCHAR to ODBC VARCHAR)? Or is this not the problem? Thanks, Donna

 
Have you tried using the OLE DB database drivers?

Matt

"Nature forges everything on the anvil of time
 
Hi

check your dw if the columns edit limit value is set to 0 or 500. maybe it is set to 256.


this can happen if eg if the dw was created when the db column has cahged from chr(256) to varchar(500) in database after the dw was created. when it is so PB saves the dw with column information char(256).
with column limit set to 0 (=unlimited) lenght more than 256 chars of entry is possible and also saved on update. but the retrieve truncates all chars beyoned of 256 characters.
to check if this is the reason edit the dw in source mode ( PB 8 and higher) and change the value to 500 for that column or export it do the changes and reimport it in library painter.

hint: PB does not store varchar information in datawindows. varchar columns are treated like char columnshere an example:

cerated table : adresse

CREATE TABLE adresse (
adresse_id decimal(16, 0) not null,
anrede char(20),
vorname varchar(80),
nachname varchar(80),
strasse varchar(80),
plz char(10),
ort varchar(80),
ortsteil varchar(80),
notiz varchar(255) primary key( adresse_id));



here the syntax fragment from a exported dw accessing the adresse table

release 8;
datawindow(units=0 timer_interval=0 color=16777215 processing=1 HTMLDW=no print.documentname="" print.orientation = 0 print.margin.left = 110 print.margin.right = 110 print.margin.top = 96 print.margin.bottom = 96 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no grid.lines=0 )
header(height=80 color="536870912" )
summary(height=0 color="536870912" )
footer(height=0 color="536870912" )
detail(height=92 color="536870912" )
table(column=(type=decimal(0) update=yes updatewhereclause=yes key=yes name=adresse_id dbname="adresse.adresse_id" )
column=(type=char(20) update=yes updatewhereclause=yes name=anrede dbname="adresse.anrede" )
column=(type=char(80) update=yes updatewhereclause=yes name=vorname dbname="adresse.vorname" )
column=(type=char(80) update=yes updatewhereclause=yes name=nachname dbname="adresse.nachname" )
column=(type=char(80) update=yes updatewhereclause=yes name=strasse dbname="adresse.strasse" )
column=(type=char(10) update=yes updatewhereclause=yes name=plz dbname="adresse.plz" )
column=(type=char(80) update=yes updatewhereclause=yes name=ort dbname="adresse.ort" )
column=(type=char(80) update=yes updatewhereclause=yes name=ortsteil dbname="adresse.ortsteil" )
column=(type=char(255) update=yes updatewhereclause=yes name=notiz dbname="adresse.notiz" )
retrieve="PBSELECT( VERSION(400) TABLE(NAME=~"adresse~" ) COLUMN(NAME=~"adresse.adresse_id~") COLUMN(NAME=~"adresse.typ~") COLUMN(NAME=~"adresse.anrede~") COLUMN(NAME=~"adresse.vorname~") COLUMN(NAME=~"adresse.nachname~") COLUMN(NAME=~"adresse.strasse~") COLUMN(NAME=~"adresse.plz~") COLUMN(NAME=~"adresse.ort~") COLUMN(NAME=~"adresse.ortsteil~") COLUMN(NAME=~"adresse.notiz~")) " update="adresse" updatewhere=1 updatekeyinplace=no )
....





Hope this helps

Bernd
 
Thanks Bernd but I have tried all this. It is a problem with Textlimit for SQLCA.dbms but I have already set this to 32000 (as recommended) and it is still truncating. I have tried using ODBC but there in the database profiles in PB there is not a field for textlimit as there is for MSS SQL Server. I am not sure of which is used i.e. data profile or code? Confused...u will be. Thanks anyway...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top