ODBC driver registration window

SOLVED

We are using the ODBC driver for some read-only data access on a Windows 7 workstation with a Sage 100 ERP 2013 Advanced client installation also on the machine. For some reason, the very first ODBC connection that my application attempts causes the registration window to popup, which blocks the process until it is closed. This does not happen on my development machine, but, as far as I can tell, the client installations are the same. Any idea as to what might be the cause?

Parents
  • 0
    Are you using the 32-bit ODBC driver or 64-bit ODBC driver to make the connection to Sage 100 data?

    The Sage 100 workstation install will automatically create the SOTAMAS90 connection (32-bit).
    This allows Sage 100 to make connection.
    If you would like to retrieve this data outside Sage 100, see information below on creating a Silent ODBC Connection.

    To View ODBC Settings:
    32-bit machine: run ODBCAD32.EXE from \windows\system32 to test the SOTAMAS90 connection (Debug tab) or create your own ODBC connection.

    64-bit machine
    The 32bit ODBC would be ODBCAD32.EXE from \windows\syswow64 to test the SOTAMAS90 connection (Debug tab) or create your own ODBC connection.
    On product update 3 or higher on Sage 100 2013, there is an updated 64bit ODBC driver.
    Here is information from the product release notes:
    A 64-bit ODBC Driver Installer for Sage 100 ERP 2013 can be found in the ..\mas90\wksetup
    directory on the Sage 100 ERP 2013 Server. Run the SageODBC64Installer.exe from each Sage
    100 ERP Workstation where 64 bit access is desired.

    For information on creating a Silent ODBC connection see our Knowledgebase Article 19495
    from https://support.na.sage.com

    Here is a summary of the article:

    Resolution
    A new Data Source must be created. The existing SOTAMAS90 is reserved for Sage 100 ERP use and cannot be used to create a Silent Connection. Using SOTAMAS90 will result in the silent ODBC connection failing once Sage 100 ERP itself is started from the workstation. The user will be prompted for the Company code, User Code and Password the next time SOTAMAS90 is accessed from the external source.

    From the Windows Desktop, open Start, Control Panel, Administrative Tools, Data Sources.
    (Note: For 64-bit operating system, you must run ODBCAD32.EXE from the "C:\Windows\SysWOW64" folder to access the 32-bit ODBC Data Source Administrator.
    On the User DSN tab, click the Add button to open the Create New Data Source window.
    Select MAS 90 4.0 ODBC Driver and click the Finish . The ProvideX ODBC Driver Setup dialog box opens
    Enter a new data source name (DSN). (e.g. SOTAMAS90_silent). Do not use spaces or blanks in the data source name.
    Enter a description for the data source.
    Enter the database directory location; this is the path to the ..\MAS90\ folder (e.g. X:\Sage\Mas90).
    Note: If the path is unknown, use the data source path from the SOTAMAS90 DSN.
    Leave the 'Definition File' field blank.
    Select Logon tab enter a valid 3-digit Sage 100 ERP Company Code.
    Note: Enter this in UPPER case letters. Entering the company code in lower case may cause the silent ODBC connection to fail.
    Enter the default User ID (Sage 100 ERP User Code).
    Note: Enter this in UPPER case letters.
    Note: Depending on the Sage 100 ERP version, the User Code may have to be three-digits.
    Enter the Sage 100 ERP Password (if necessary).
    Note: Do not use spaces or blanks in the password name.. If the password contains spaces, it must be changed in User Maintenance.
    Click OK.
    Exit the ODBC Data Source Administrator and Control Panel
    Use the external application to connect to the silent connect data source. The data should be accessed without requiring a login.
    Note: In some applications, User DSNs, such as SOTAMAS90_Silent will be displayed as a "Machine Data Source" since a User DSN is a machine specific concept.

    Note: Be sure to disable (uncheck) the 'Dirty Read' and 'Burst Mode' checkboxes. An explanation of both options is below:

    Dirty Read:
    Default value = Enabled

    If enabled, the driver attempts to use data already within its buffers from prior reads. In theory, an update could occur while the query is in progress and may be missed. In practice this is not likely to happen.

    Burst mode:
    Default value = Enabled

    Note: Burst mode can be used when the execution of an SQL command and its associated 'data fetches' is going to be done without the application delaying for user input. The ODBC driver will apply short-term locks to improve performance between data fetch commands. When the application executes a SQL command then fetches a row, the physical data file will remain locked until at least 20 rows have been fetched (or EOF). This can be used with Report style access but should not be used for interactive access.
  • 0 in reply to DGR

    Here is a screen shot of the window... 

    Using 32-bit driver. As I mentioned in the opening post, this works fine on my dev workstation. Here is the connection string my application is using:

    Driver=MAS 90 4.0 ODBC Driver;Directory=\\serverp\sage\Version2013\mas90;Prefix=\\server\sage\Version2013\mas90\SY\;Company=ABC;UID=usr;PWD=password;CacheSize=4;DirtyReads=1;BurstMode=1;StripTrailingSpaces=1;

Reply
  • 0 in reply to DGR

    Here is a screen shot of the window... 

    Using 32-bit driver. As I mentioned in the opening post, this works fine on my dev workstation. Here is the connection string my application is using:

    Driver=MAS 90 4.0 ODBC Driver;Directory=\\serverp\sage\Version2013\mas90;Prefix=\\server\sage\Version2013\mas90\SY\;Company=ABC;UID=usr;PWD=password;CacheSize=4;DirtyReads=1;BurstMode=1;StripTrailingSpaces=1;

Children
  • 0 in reply to vbnet3d
    Does this apply?:

    Error: "ProvideX ODBC - Activation Information" window appears in various tasks Article
    Products

    Sage 100

    Description
    "ProvideX ODBC - Activation Information" window appears in various tasks, such as in Crystal Reports Designer.

    The window prompts for:

    Serial Number
    Number of Users
    Activation Key

    Cause
    The window appears because the SOTAMAS90 DSN is missing from the "Drivers" tab in the ODBC Administrator.

    Resolution
    On the computer experiencing the ProvideX ODBC Activation Information window:

    Via Windows Explorer, browse to "C:\Windows\SysWOW64"
    (Note: C:Windows\system32 folder for 32-bit operating systems)
    Rename the following files (if present)
    pvxio.dll
    pvxdec32.dll
    pvxobdc.dll
    Uninstall the Workstation Setup
    Re-install Workstation Setup

    Entering the following information may also resolve the issue:
    Serial Number: 500001
    Number of Users: 1
    Activation Key: 5DE5C882FC4DBEB6
  • 0 in reply to toddrt
    verified answer
    Thank you for all your help - it should be helpful for anyone seeing this in the future in general. In our case, I tried everything you suggested, and had no luck. Everything matched what I should have been seeing. It turns out that this issue was actually a lot deeper.

    First off, the window was actually caused to be shown because the ODBC driver was being invoked with concurrent requests on the same user. My application is heavily multi-threaded, but I put in a number of safety checks to prevent concurrent requests of this nature. However, as I dug deeper into the problem, I discovered that the OS had somehow orphaned one of the child threads of my application, and kept it running long after the main process had ended. This orphaned thread did not show in Windows task manager or any other process monitor. I only discovered it through my own custom tools that were monitoring the application. The orphaned thread continued running, and this resulted in the collision when the complete application ran.

    So, note for future reference for developers: A registration window popup on ODBC calls may be caused by concurrent requests with the same user from multiple threads.
  • 0 in reply to vbnet3d
    Not likely the OS orphaned a thread.

    Task Manager will not show threads.
    Google sysinternals and download the Sysinternal Suite
    Run process explorer to show all threads running off a process.

    Windows API ODBC rules for safe multi threading.
    Only allocate a single ODBC environment, then use SQLAllocConnect to get a private
    environment connection handle, then SQLConnect to open the data source.

    check for errors, time outs etc
  • 0 in reply to sevendogzero
    You are correct that it is not a normal occurrence, however it definitely did happen in this one instance. I did some careful cross-checking to verify that.

    I will check out Sysinternals - thanks for the info.

    The standard ODBC rules did not apply in this case due to the fact that the orphaned thread was on a different computer (and in any case would not have been part of the application domain, since it was spawned by another process), but I will certainly review my setup to verify that it is using the correct methodology. Thanks again for your help!