Connection String to Silent ODBC DSN using ProvideX ODBC Driver is forcing connection to default to SOTAMAS90 DSN

SUGGESTED

We are querying invoice data to read from MAS using the ProvideX ODBC driver from within a custom application.  Within the custom application, we have tried specifying credentials explicitly within the connection string used to open the ODBC connection but we are finding that the driver appears to be using the default SOTAMAS90 DSN even when we specify a different Silent Connection (https://support.na.sage.com/selfservice/viewContent.do?externalId=19495&sliceId=1) DSN or specify a connection string that doesn't specify a particular DSN but does supply credentials.  This is a problem because any time the Sage application is launched from the same workstation, the saved credentials within the ODBC connection for the SOTAMAS90 DSN get cleared out and the user is prompted for this login information at runtime when running the custom application.  if we edit the SOTAMAS90 DSN by supplying it with valid user credentials the problem goes away and the user can run our custom application without being prompted, but as soon as Sage is relaunched the credentials get cleared out again and the user gets prompted once again.  How can we establish a connection string within our application to the Silent Connection and have it actually connect to the Silent Connection and not the default SOTAMAS90 DSN?

Parents
  • 0
    SUGGESTED

    If your custom application can access user DSNs, you should be able to pass it the following connection string.

    DSN=SOTAMAS90;UID=user;PWD=password;Company=ABC;

    If it can't access user DSNs then you can always have it create a system DSN by writing to the registry but this would require elevated rights. You would just copy the contents of the user DSN to the system DSN so the paths are correct. You can then optionally set specific options for your system DSN. 

    If you don't want to use "DSN=" in your connection string, you could instead use "driver={MAS 90 4.0 ODBC Driver}" followed by all the required parameters. I prefer using the DSN route since i won't have to worry about paths. As long as the workstation is updated during the upgrades or server moves, the user DSN named SOTAMAS90 should always have the correct paths and default options.

Reply
  • 0
    SUGGESTED

    If your custom application can access user DSNs, you should be able to pass it the following connection string.

    DSN=SOTAMAS90;UID=user;PWD=password;Company=ABC;

    If it can't access user DSNs then you can always have it create a system DSN by writing to the registry but this would require elevated rights. You would just copy the contents of the user DSN to the system DSN so the paths are correct. You can then optionally set specific options for your system DSN. 

    If you don't want to use "DSN=" in your connection string, you could instead use "driver={MAS 90 4.0 ODBC Driver}" followed by all the required parameters. I prefer using the DSN route since i won't have to worry about paths. As long as the workstation is updated during the upgrades or server moves, the user DSN named SOTAMAS90 should always have the correct paths and default options.

Children
  • 0 in reply to David Speck

    Thank you for the suggestion.  Unfortunately, we have tried the formats you're suggesting without success.  We've tried both "DSN=SOTAMAS90;UID=user;PWD=password;Company=ABC;" as well as "DSN=SOTAMAS90SILENT;UID=user;PWD=password;Company=ABC;" (using a silent connection we've set up), but despite supplying all needed credentials in with the connection string MAS is still prompting the user for credentials if they are not present in the ODBC control panel for the SOTAMAS90 DSN.  Even when using the second format mentioned that is pointing to a different DSN, it is still prompting for credentials (and stranger yet, even though we're specifying a different DSN when we supply SOTAMAS90 with credentials in the ODBC control panel the application runs without prompting the user).  It behaves as though the driver is hard-coded to use the SOTAMAS90 DSN when the driver is used regardless of the settings we provide.