Alpha DevCon 2018
Results 1 to 16 of 16

Thread: Invalid Precision Error HY104

  1. #1
    Member
    Real Name
    Batul
    Join Date
    Jul 2010
    Posts
    2

    Default Invalid Precision Error HY104

    Hi,

    I am a DBA and have a developer using Alpha5 v10.5. He is writing to MSSQL v2005 table. We have a DEV and Production environment setup and he is carrying out exactly the same steps in both which is to insert text to a field which is defined as VARCHAR(MAX). The error he recieves is as follows in the PROD environment but not in DEV:

    Record was not inserted:
    Database API specific error [Microsoft][ODBC SQL Server Driver]Invalid precision value SQL State is: HY104

    I have attached a screenshot of the error also. I have googled many forums and understand this is the ODBC API error but I can't find a fix. It is even more fustrating as it works in DEV but not in PROD.

  2. #2
    Member
    Real Name
    Ken King
    Join Date
    Aug 2007
    Posts
    186

    Default Re: Invalid Precision Error HY104

    I'm getting the same error today on an nvarchar(max) SQL field. Did you ever figure this out?

  3. #3
    Member
    Real Name
    Batul
    Join Date
    Jul 2010
    Posts
    2

    Default Re: Invalid Precision Error HY104

    Hi Iviowa,

    unfortunately not, the problem still exists after trawling through so many different forums I am none the wiser, if you find a solution I would appreciate you letting me know.

  4. #4
    "Certified" Alphaholic
    Real Name
    eric
    Join Date
    Mar 2009
    Location
    Amsterdam
    Posts
    1,284

    Default Re: Invalid Precision Error HY104

    DEV and PROD have same Alpha build?
    What version number. Why use odbc if there is a native connect.

  5. #5
    Member OfficePro's Avatar
    Real Name
    Marco Kregar
    Join Date
    May 2010
    Posts
    56

    Default Re: Invalid Precision Error HY104

    Hello
    try to disable write conflict flag.

    Marco

  6. #6
    Member DW0905's Avatar
    Real Name
    Dave Wyatt
    Join Date
    Dec 2008
    Location
    Northants, UK
    Posts
    32

    Default Re: Invalid Precision Error HY104

    Both DEV and PROD are on the same (latest build). We are using native connect, but the error mentions ODBC? Disabling the write conflict flag unfortunately does not resolve the problem.

    Replying on behalf of batsy.

    Regards

  7. #7
    Member
    Real Name
    Ken King
    Join Date
    Aug 2007
    Posts
    186

    Default Re: Invalid Precision Error HY104

    Both DEV and Prod are running the same version (2972_3566). It's not the very latest version by I tried updating the lastest (3040_3571) but still go the error. Then went back to earlier version.

    The "Check for write conflicts" is unchecked.

    I'm not using ODBC. I'm using AlphaDAO. The radio button that is checked for Data Source is: "Remote Database accessed via AlphaDAO (Alpha Data Access Object)". I don't know why the error says "ODBC".
    Last edited by iviowa; 08-05-2010 at 09:59 AM. Reason: typo

  8. #8
    Member
    Real Name
    Ken King
    Join Date
    Aug 2007
    Posts
    186

    Default Re: Invalid Precision Error HY104

    Here is my solution for now. If anyone has a better idea, please let me know.

    If I change my connection string to SQL 2000 it works:
    {A5API='SQLServer',A5DBVersion=2000,Server='ServerName',A5ANSINullPadWarn=Default,Trusted_connection=yes,Database='DatabaseName'}

    I only changed the components that were getting an error saving to an nvarchar(max) field. All other components still use 2008. I tried 2005 but got the same error:
    {A5API='SQLServer',A5DBVersion=2008,Server='ServerName',A5ANSINullPadWarn=Default,Trusted_connection=yes,Database='DatabaseName'}

    BEWARE: This will not work if you are using ‘Date’ fields. ‘Date’ fields (date portion only – no time part) were introduced in SQL Server 2008

    Once you make the change you will need to publish the new connection string to the server. Remember to add the connection string to the “Named AlphaDAO connection strings” in your publish settings. Republish checking “All files in the project”, uncheck “Publish new or modified files only”, click “Clear Publishing History”. I also had to restart the Application Server for the connection string to be available.

    Alpha Software worked a great deal with me to try to recreate the problem but together could not recreate it. For what it's worth, my thinking is that it may be more of a Microsoft SQL driver issue than an Alpha Software issue.

  9. #9
    Member
    Real Name
    Lee Haddox
    Join Date
    Jan 2011
    Posts
    7

    Default Re: Invalid Precision Error HY104

    I was having this same issue, and changing the server in my connection string from 2008 to 2000 fixed it, but I didn't like the fact of being limited to using data types that were 2000 compliant. Below is a description of the cause of this problem, along with a fix.


    Using a version of 2008 tells Alpha Five that you intend to work with SQL Server 2008 or 2008R2 or above and will be using the 2008 version of the native client for SQL server. A mismatch in the client driver can cause the error you are seeing. If you haven’t already, download sqlncli.msi for X86 on each client accessing your SQL Server database.

    http://www.microsoft.com/download/en....aspx?id=16978


    Microsoft® SQL Server® 2008 R2 Native Client
    Microsoft SQL Server 2008 R2 Native Client (SQL Server Native Client) is a single dynamic-link library (DLL) containing both the SQL OLE DB provider and SQL ODBC driver. It contains run-time support for applications using native-code APIs (ODBC, OLE DB and ADO) to connect to Microsoft SQL Server 2000, 2005, or 2008. SQL Server Native Client should be used to create new applications or enhance existing applications that need to take advantage of new SQL Server 2008 R2 features. This redistributable installer for SQL Server Native Client installs the client components needed during run time to take advantage of new SQL Server 2008 R2 features, and optionally installs the header files needed to develop an application that uses the SQL Server Native Client API.

    Audience(s): Customer, Partner, Developer
    X86 Package (sqlncli.msi)
    X64 Package (sqlncli.msi)
    IA64 Package (sqlncli.msi)

  10. #10
    Member
    Real Name
    Lawrence Sprowls
    Join Date
    Nov 2011
    Location
    USA
    Posts
    64

    Default Re: Invalid Precision Error HY104

    The 11-30-2011 04:17 PM solution above solves the problem for the Application Server v11.

  11. #11
    Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,431

    Default Re: Invalid Precision Error HY104

    Quote Originally Posted by lsprowls View Post
    The 11-30-2011 04:17 PM solution above solves the problem for the Application Server v11.
    a link would be nice.

    I've seen you build one before, so you know how to do it..

    Or are you referring to post #9 of this thread?

    I'm guessing that you are on US eastern time. There are ~ 23 other time zones that show a different time for that post......
    Last edited by Al Buchholz; 01-12-2012 at 08:37 PM.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  12. #12
    Member
    Real Name
    Lawrence Sprowls
    Join Date
    Nov 2011
    Location
    USA
    Posts
    64

    Default Re: Invalid Precision Error HY104

    Yes, the answer is to download and install a Microsoft SQL Server 2008 R2 Native Client linked in Post #9.

  13. #13
    Member
    Real Name
    Islip
    Join Date
    Jun 2010
    Posts
    115

    Default Re: Invalid Precision Error HY104

    It is working, make sure to install this on your sever running the alpha five server
    Last edited by Islip; 03-01-2012 at 04:24 PM.

  14. #14
    Member
    Real Name
    David Fricke
    Join Date
    Sep 2011
    Location
    Kenosha, WI
    Posts
    356

    Default Re: Invalid Precision Error HY104

    What about SQL Server 2012 Business Intelligence? I'm getting the error when I try to update an image field.

    Both the App and Dev are same version. I can insert the image when running the preview from the Dev, but once published, it doesn't work.
    Last edited by dfricke10; 12-20-2012 at 03:50 PM.

  15. #15
    Member
    Real Name
    David Fricke
    Join Date
    Sep 2011
    Location
    Kenosha, WI
    Posts
    356

    Default Re: Invalid Precision Error HY104

    Nevermind. Got it. Since upgrading to SQL 2012, I never changed the connection string to 2012 instead of 2008. I also installed the Microsoft SQL Server 2012 Native Client from here http://www.microsoft.com/en-us/downl....aspx?id=29065 before doing that, so I really don't know which one fixed it. But it works now.

  16. #16
    Member
    Real Name
    Paul Verboom
    Join Date
    Apr 2006
    Location
    Halifax, Nova Scotia, Canada
    Posts
    130

    Default Re: Invalid Precision Error HY104

    Thanks, Lee Haddox,
    I was also getting the error;
    Database API specific error [Microsoft][ODBC SQL Server Driver]Invalid precision value SQL State is HY104.
    What caused the error in my case was a little different so I figured I would add to this thread.
    I was writing Blob values back into SQL Server 2012 using Alpha5 Ver 10.5. The blob values are stored locally in memo fields. When I looked at the SQL update statement being generated by Alpha5 the Blob value was represented by a huge ASCII encoded value. Surprised it worked but with the correct 2008 R2 Native Client it does.

Similar Threads

  1. invalid report error.
    By braveulysses in forum Alpha Five Version 7
    Replies: 3
    Last Post: 03-24-2007, 01:44 AM
  2. Field Statistics decimal Precision
    By dpawley in forum Alpha Five Version 7
    Replies: 1
    Last Post: 01-24-2006, 10:35 PM
  3. Error: Invalid Table Handle????
    By Charles Brucks in forum Alpha Five Version 5
    Replies: 3
    Last Post: 06-26-2004, 11:32 AM
  4. Invalid Number error from look-up table
    By friendlybytes in forum Alpha Five Version 5
    Replies: 4
    Last Post: 03-24-2004, 11:30 AM
  5. Invalid Key length error
    By Willard in forum Alpha Five Version 4
    Replies: 5
    Last Post: 07-18-2000, 10:20 PM

Posting Permissions

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