Merant ODBC

g_remyx

New Member
Hello,

I have a problem with the Merant ODBC driver (9.1D) (win 2000). In the progress Database, there is a field "List_name" with a "x(100)" _width. the field is filled by 55 chars, not over the "x(100)" _width. When i start my query, if this field is in it, it return nothing but without this field, it works.
Is there a limit of the real width field with the ODBC driver ?
how can i do to resolve this problem ?

:confused:
 
I've got the same Problem using it in a ASP.
There are several Fields including Data but if I read them in my .asp File they are empty.
If I read them with read/write connection, I get the errormsg: "....has value exceeding its max length or precision"
 
Hi,

According to the Progress KB this may be your problem (KB19670):
Solution: Check your SQL statement. If the field name contains reserved characters ("), (_) or (-), enclose your field name in double quotation marks ("). For example, to display all user names and the user ID, enter this syntax into the Procedure Editor:
"SELECT _userid, _user-name FROM _user ORDER BY _userid ASC

In Visual Basic, you must use double quotation marks ("):
"SELECT " + Chr(34) + "_userid" + Chr(34) + " FROM PUB." + Chr(34) + "_user" + Chr(34)
OR (ID: 20008)
This error appears on a SQL-92 Client when trying to return data stored in a character field greater than the defined SQL width of the field.

With a 4GL connection to a Progress Database there is no size limit for a character field (except the 32k limit for the all record). By default, the SQL-WIDTH is set to twice the length of the displayed format. Since programs may not take the displayed format into account, the data size may easily go beyond the SQL-WIDTH of the field, hence the error with SQL-92 Clients.

Fix:
1. Scan the entire database and check to see whether data contained in character fields exceeds the SQL-WIDTH. Please reference Progress solutions P13348, "How to detect problematic SQL-WIDTH with a 4GL program" and P24496, "What is the DBTool ?".

2. Expand SQL-WIDTH.

Follow these steps to change the SQL width:

From the Data Dictionary on UNIX
1) Select Schema.
2) Select SQL Properties.
3) Select the desired table.
4) Change the width for desired field to a number that your data length is (less than 2K).
5) Save.

From Data Dictionary on Windows:
1) Select "SQL Properties" from "Options" menu.
2) Select "Adjust Field Width".
3) Change the width for desired field to a number that your data length is (less than 2K).
4) Save.
I have not tried any of the above myself - I have not used ODBC on a Progress DB for quite some time. I just did a little search in the knowledge base because I was curious about the problem you are having...
 
@jongpau
The Problem is not cause of missing double quotation marks. But thanks for the tip. I also had to search for this solution.:)

I tried the second tip of you, I also read on other sites in the internet.
On a trainings DB i impoved the SQL Field width and it worked well.
But I dont know, if i can change the SQL Field width on the operational DB.

Is it not possible to make it working only with changes on the "Client" side?

What is the biggest SQL Field width i can choose? (heared about 32k, or ist that the max field width in Progress DB?)

Thanks for your help!
 
According to the knowledge base entry that I posted the max size if a character field is 2kb... (see my previous post). If that is so you might get into trouble with large blocks of text. You may have to move those into blob fields (RAW) - that is, if those kinds of fields are handled well by the SQL/ODBC implementation, but that is easy enough to test.

If memory serves me right the 32k limit is per record (so for all the combined fields together in one single record).
 
I've already seen this problem. The origin was the sql width value of the field on data definition. Usually sqlwidth have to be set at 2 X the field size (if X(2) then sql width = 4).

Hope it's help
 
Back
Top