Select data from Progress

ze.espogeira

New Member
Hi to all, im a newbie in Progress and i'm getting an error that is simply driving me crazy! :)

when trying to retrieve data from Progress 10.1B, using a ODBC (DataDirect Driver) in a MSSQL linked Server, i get the following error:

OLE DB provider "MSDASQL" for linked server "OE_LKS_v2" returned message "[DataDirect][ODBC Progress OpenEdge Wire Protocol driver][OPENEDGE]Column msg in table PUB.K_SYS_MESSAGE has value
exceeding its max length or precision.".


Also, in my C# app, when using a DataReader for the same query, the error mesasge is a bit different but (i guess) it means pretty much the same:

"String data, right truncated. Error in parameter 1"

After a few (thousands! :) ) searches in google i've found little about the reason for this to happen!
Nevertheless i've found something about a "DBTOOL" wich could solve the problem... although i couldn't get it solved.

So my, can any of you guys help me with this issue?? if the solution passes through using DBTOOL, can you plz guide me how to do it??


Thanks in advance!
ze
 

ze.espogeira

New Member
Thank you for your comment!

the problem was solved by re-creating the tables with longer width in the required table field .
example
ADD FIELD "FIELD_DESC" OF "K_CRE_BASE_PRODUCTS" AS character
FORMAT "X(50)"
INITIAL ?
POSITION 4
MAX-WIDTH 100
LENGTH 50
ORDER 30


the max-width value for the column FIELD_DESC was changed from 16 to 100 , now querying it w/ linked server or in the .NET app it retrieves the values correctly!

Thank you!!
Ze
 

RealHeavyDude

Well-Known Member
You don't need to re-create or update the table via the data dictionary. You can also run the dbtool utility from the command line to fix the SQL widths. This is a known issue and running the dbtool utility on a regular basis against databases which are accessed by ABL and SQL clients is a good idea. The data dictionary format definition is "only" the standard input/output format and is not validated when the value is directly assigned from ABL code. Therefore, one never knows - I have seen applications that deliberately wrote control characters beyond the standard input/output format so that they are not seen by the user. Needless to say that I don't consider that best practic - IMHO it's bad practice.

Heavy Regards, RealHeavyDude.
 
Top