ERROR [HY104] [Microsoft][ODBC Microsoft Access Driver]Invalid precision value

Discussion in 'ASP .Net' started by jwtulp@hotmail.com, Jan 1, 2006.

  1. Guest

    Hello all,

    I receive the following error when updating MSAccess2003 Memo fields
    using an ODBC connection in ASP.Net 1.1 when the length of the text to
    be updated exceeds 255 characters. Everything works fine when the
    length of the text stays below 255 characters. Does anyone have a
    clue?:

    ERROR [HY104] [Microsoft][ODBC Microsoft Access Driver]Invalid
    precision value

    ConnectionString used:
    PageTimeout=5;FIL=MS
    Access;MaxBufferSize=2048;DSN=mydb;UID=admin;DBQ=C:\\Inetpub\\wwwroot\\mysite\\DB\\mydb;DriverId=25

    Code with OdbcParameter:
    this.PersonUpdateCommand.Parameters.Add(new
    System.Data.Odbc.OdbcParameter("description",
    System.Data.Odbc.OdbcType.NText, 2147483647, "description"));

    The field in the MSAccess2003 database is called description, and is of
    type Memo

    Code used for updating:
    PersonUpdateCommand.Parameters["description"] = new
    OdbcParameter("description", person.Description);
    PersonUpdateCommand.ExecuteNonQuery();
     
    , Jan 1, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page