Sage 100

 View Only
Expand all | Collapse all

SOTA ODBC Driver not established in SQL environment

  • 1.  SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 15:18

    Why wouldn't the SOTAMAS90 ODBC driver be automatically established on a SQL sage installation?  I'm at the application server (not the db server).  I've tried to set up the ODBC driver manually and am getting a SAM communication error.  I swear I can't find anything any more in Sage's KB.



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------


  • 2.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 15:25

    The ODBC driver is ProvideX, not needed or usable in Premium (SQL).  You can create an ODBC DSN to connect to SQL, but if you create a SQL Server Native Client connection in the report or program you are trying to connect to Sage, you don't need to create a DSN on each workstation.



    ------------------------------
    Phil McIntosh
    Friendly Systems, Inc.
    ------------------------------



  • 3.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 15:36

    Thanks all.  



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 4.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 15:25

    Hi Jane

       Premium uses the SQL connection.  The SOTAMAS90 ODBC is only for Providex systems

     

     

    Bob Osborn

    ,

    MCSE

    Sr. Consultant, Sage 100

    e:

    BobO@dsdinc.com

    p:

    800-627-9032 x 180

    w:

    www.dsdinc.com

     

     






  • 5.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 16:20

    I'm frustrated with a custom Crystal report of my client.  It has a fairly complex formula in it and the connection is to the SQL db.  The report runs without error when I run the report on the server.  When the end user runs the report, they get the following error pitched on the formula.  The UDF that is the problem is the UDF_PM_PERCENTAGE as the it was set up as a string (why?  I dunno it wasn't me) instead of a numeric.  Why don't I get this error when running the report at the server?  I've looked at the records in with this field and they are either blank or have a real numeric value.



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 6.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 16:40

    I tend to create a specific formula field to "clean" and convert a value that was set up as text instead of numeric, then use the cleaned value everywhere that needs a numeric value.  (Blanks are not numeric... so the ToNumber function will fail).  Something like this:

    if isnull(fieldname) or not(isnumeric(fieldname))

    then 0

    else tonumber(fieldname)



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 7.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 16:43
    Silly question but in the upper right hand side of formula editor, have you tried changing the setting to default value for nulls?  I have had issues with formulas being blank based on how that setting is done. Not sure that can help with this but figured I would mention it. 
    Sent from my iPhone





  • 8.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 16:46
    Also - along what Kevin is saying - declare a variable at the top to set the value to numeric before you do anything else and hard set it to 0 if is null.  My guess is that something in the logic is allowing the null to go through and that could be the issue. 
    Sent from my iPhone





  • 9.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 16:41

    I'm not sure how it works on the server.  ToNumber("") gets you the string is not numeric error.

    Suggestion:

    local stringvar percent := UDF_PM_PERCENTAGE;
    If trim(percent) = "" then
        percent := "0";

    Then replace the UDF elsewhere in the formula with percent



    ------------------------------
    Phil McIntosh
    Friendly Systems, Inc.
    ------------------------------



  • 10.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 17:07

    Thanks again for the help.  I've added the below to the formula.  I'm waiting to hear from the end user if he can run the report without getting an error.  @Tara Schinkel I thought about the converting blanks to default, but I didn't think that would work well/help since this dang field is a string instead of a numeric.



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 11.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 17:19

    Check for both NULL values and blanks, distinctly.  They are technically different things.

    Also, always do the ISNULL check first... because (depending on report settings) an uncleaned NULL will break CR formulas.



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 12.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 17:42

    This formula is pi**ing me off.   I have incorporated Kevin's syntax and I get this message now.  I've used ChatGPT to fix my syntax but it doesn't fix it.  I hate this formula and I hate this stupid string field.  If they would have set it up as a numeric I wouldn't be on this hate train.



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 13.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 17:46

    Create a separate new formula with the cleaning syntax, then replace all references to the UDF with the cleaned formula.



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 14.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 17:58

    Hi Jane,

    I think you just need to remove the End If in the "check if UDF_PM_PERCENTAGE is null" formula



    ------------------------------
    Javier Guzman
    Consultant
    ProSolutions
    ------------------------------



  • 15.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 18:09

    Make each piece of your formula work independently, verified, then put them together.  Putting all the complex logic in one formula makes it harder to troubleshoot.

    Here is an example, using a stock Sage field that is text, but holds a number...



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 16.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 18:59

    no matter how I break apart the formula, it does not like "Then 0" - it keeps giving me the message that A Statement is expected here" and it highlights the zero 



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 17.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 20:27

    Hi Jane

      Make sure in the formula that it is set to use Crystal Syntax

     

     

     

     

    Bob Osborn

    ,

    MCSE

    Sr. Consultant, Sage 100 

    e:

    BobO@dsdinc.com

    p:

    800-627-9032 x 180

    s:

    Sage100Support@dsdinc.com

     

     






  • 18.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 20:29
    And I would use default for nulls too. 

    --
    Tara Morgan Schinkel, CPA
    Stewart Technologies, Inc.
    CFO/ Team Lead for Apps 


    Get the Boomerang Email App on mobile



    ----------





  • 19.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 21:11

    OK everyone, here's what I know now.  This report runs  in the live company with the formula I originally posted, but does not run (errors) in the company where the database connecter is assigned.  I totally don't understand that.  I think what they are trying to do is tie this report's DB to a test company (I suppose so that no one runs it in the live company??).  Anyway, it runs without error in the LIVE company, which is not the company that the report is assigned to in the report's connected DB.  I feel like I'm in the twilight zone .. nothing makes sense.



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 20.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-04-2024 10:11

    Here's what I think you are saying: 

    • You are using a SQL ODBC to connect ( because SOTAMAS90 would not exist )
    • To access a Live vs Test company someone has probably create two different SQL ODBC and set the company code within the SQL ODBC ( reason for this is that SQL ODBC does not prompt for Sage company code like SOTAMAS90 ODBC does)
    • And when using the SQL ODBC for the LIVE company - the report works. But when using the SQL ODBC for the Test company the report doesn't work.
    • In each of your tests you are using the exact same Crystal Report and only the SQL ODBC is changing

    If my understanding and explanation above is correct, could it be something that is not set in the SQL ODBC being used to connect to the test company?  I'd try comparing the two.

    If I've misunderstood somehow then disregard



    ------------------------------
    Wayne Schulz
    wayne@s-consult.com
    Schulz Consulting
    (860) 516-8990
    CT
    ------------------------------



  • 21.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-04-2024 13:21

    @Wayne Schulz

    Your summary is perfect.  The report does connect to the database of the test company, it just hits this error when running the report for a selected salesperson.  I don't know why and it is driving me bonkers.



    ------------------------------
    Jane Scanlan
    Partner
    Next Level Manufacturing Consulting Group
    ------------------------------



  • 22.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-04-2024 13:35
    Edited by Kevin Moyes 12-04-2024 13:42

    My guess would be a bad value (blank / null / extra text) in a field that (co-incidentally) only happens for that one SP in the test company.

    Edit:

    We have some clients who use the item Weight field, or one of the Category fields for numeric values... and occasionally we get complaints about report errors with bad data.

    The user typing extra " lbs" text characters may read OK by a human, but of course it isn't numeric anymore, and Crystal Reports would choke on it when trying to do a conversion to number.

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 23.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-04-2024 14:14
    Edited by Jeff Schwenk 12-04-2024 14:15

    WAD - I just cannot figure out why a weight field is set as a string.  Does anyone know of a logical reason relevant in today's environment?



    ------------------------------
    Jeff Schwenk
    Owner
    Bottomline Software, Inc.
    Waynesboro VA
    (540) 221-4444

    Improving bottom lines for over 25 years!
    ------------------------------



  • 24.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-04-2024 14:15

    Including U of M?  Wait, you said solid.  That's sort of mushy.



    ------------------------------
    Beth Bowers
    (269) 358-0989
    ------------------------------



  • 25.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-04-2024 14:48
    Because the decision was made 40 years ago and no one changed their minds.
    --
    Robert Wood

    --

    Sent from my portable brain





  • 26.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-04-2024 15:00
    Edited by Steve Iwanowski 12-04-2024 15:01

    IIRC, Crystal has a VAL() function that will return a number, assuming it's first in the string, so VAL("35 lbs") would return 35, while VAL("lbs 35") would return 0.



    ------------------------------
    Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
    ------------------------------



  • 27.  RE: SOTA ODBC Driver not established in SQL environment

    Posted 12-03-2024 23:49

    I mean a new formula field entirely.

    Have a new formula field that does one thing, and one thing only: just the cleaning logic... with a numeric result.

    Then use this new named formula in place of the UDF, in the original formula.



    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------