Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    4

    Unanswered: [MERANT][ODBC Progress Driver] Precision error

    Hi,

    I'm using Delphi and i'm trying to run an insert sql statement to a progress database through the Merant odbc driver.

    Everything is fine until one of my parameter need to be '', here the error i get

    [MERANT][ODBC Progress Driver] Character, decimal, and Binary parameters cannot have a precision of zero. error in parameter 1.

    what the hell ? A string/character need a precision ?

  2. #2
    Join Date
    Nov 2003
    Location
    Lomza, POLAND
    Posts
    81
    Hi,
    Probably here is what you need (the solution from Progress Knowledge Center):

    ID: 20008
    Title: "ODBC/JDBC Error 7864 Caused by Insufficient SQL-Width"
    Created: 31-Jul-2000 Last Modified: 30-Jun-2004
    Status: Verified

    Known to occur in:
    Progress 9.x


    Symptom(s):
    Column <column> in table <table> has value exceeding it max length or precision (7864)

    Getting error 7864 with SQL92 client

    Error 7864 with ODBC, JDBC clients or SQL explorer querying database


    Cause(s):
    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.

    To change the width programmatically (via the Progress 4GL):
    find first _file where _file._file-name = "". find first _field of _file where _field._field-name = "". update _field._width.


    Hope it helps.
    Regards
    Bogdan Brzozowski

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •