Hello,
I have an ODBC connection manager to a Progress database. In that database there is a column declared as a string of 10 characters long.
However, some data in this column is actually up to 15 characters long.
This makes my DataReader Source fail everytime I try to run my package because it sets the output column like this :
Datatype : Unicode string [DT_WSTR]
Length : 10
Is there any way to solve this without changing the datatype in the Progress database (that is beyond my control) ?
tanks in advance ...
What are you talking about? How can you have a column declared with a width of 10 and have data that exceeds that length? You might want to double check your source metadata.|||renyx wrote:
In that database there is a column declared as a string of 10 characters long.
However, some data in this column is actually up to 15 characters long.
That is a physical impossibility.
Can you expand more on what you mean?
-Jamie
|||
In Progress a column can be declared as Char(10) while creating the table, but while inserting in the table, a value larger than 10 can be inserted without causing an error.
So I am looking for a way to make the DataReader output column 15 in length.
|||renyx wrote:
In Progress a column can be declared as Char(10) while creating the table, but while inserting in the table, a value larger than 10 can be inserted without causing an error.
So I am looking for a way to make the DataReader output column 15 in length.
Really? OK, I take it back. Sorry. That's just....bizarre....for want of a better word.
I think you'll be able to go into the Advanced Editor of the Datareader Source and manually edit the column lengths.
|||
Jamie Thomson wrote:
Really? OK, I take it back. Sorry. That's just....bizarre....for want of a better word.
I think you'll be able to go into the Advanced Editor of the Datareader Source and manually edit the column lengths.
I just looked into this some... Progress 4GL does not use the width definition for the storage of data. Character data types in Progress 4GL can be up to 2,000 characters, I believe. The char(10) definition that the OP mentioned is for query results, I believe, and not for storage.
So, how to get around this? Well, do as Jamie suggested and edit the Datareader Source manually using the advanced editor.|||
Thanks for the suggestion, but that did not work.
I also tried a query on the column in management studio (linked server) and that also did not work.
OLE DB provider "MSDASQL" for linked server "LISA" returned message "[DataDirect][ODBC OPENEDGE driver][OPENEDGE]Column KM4-CODE in table PUB.ARTIKEL has value exceeding its max length or precision.".
Looks like I will have to convince the Progress people to change the datatype.
|||This is a well known Progress problem. Check out http://www.progresstalk.com/archive/index.php?t-76301.html|||By the way, I'm just going on record to say that the Progress leaders should be sent back to logic school for designing a product that enforces the data length on a one-way basis. "Um yeah, we let you store data greater than what's defined, but we won't let you select it back out."That's the most ridiculous thing I have heard in a long time.|||Same issue happens to me. We import data from a Thoroughbred basic database. The field can be 12 chars long with 20 chars of data. In the Thoroughbred world, this is just an "integrity" problem....Their db still works somehow, but causes fits on our end.|||
If anyone out there wants a humorous outlook on this (and promises not to take offence to SQL zealots), go here: http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=263&messageid=340643
-Jamie
|||
Thoroughbred still lives? Aaargh! The only implementation of a computer language I ever saw that allowed indefinite GOTOs (I'm not kidding). I had not heard about this "integrity" issue with their DB, but am not surprised.
|||
renyx wrote:
Thanks for the suggestion, but that did not work.
I also tried a query on the column in management studio (linked server) and that also did not work.OLE DB provider "MSDASQL" for linked server "LISA" returned message "[DataDirect][ODBC OPENEDGE driver][OPENEDGE]Column KM4-CODE in table PUB.ARTIKEL has value exceeding its max length or precision.".
Looks like I will have to convince the Progress people to change the datatype.
Renyx, did you try changing the SqlCommand select statement to cast the column to something longer?
As you noted, you cannot change the column length in the advanced editor, but doing so in the select statement might work for you.