How can I store MAS authentication in an Excel ODBC link?

I'm new to MAS, recently hired on to a company using MAS 200 4.40.  I'm trying to utilize some of my experience with querying SQL databases to streamline work and am stumbling over how to avoid typing in my username and password to refresh my data in Excel.  Searching through the forums here has yielded some possibilities but nothing has worked.  Despite making changes to the connection string I still encounter the authentication pop-up.  I've set up a 'dummy' ODBC connection and tried a few different syntax sequences but haven't seen success.  I'm also looking into how to trigger a login routine in VB but am not having much success on that endeavor.

I'm using Excel as my import for several reasons.  One is that the MAS server doesn't seem to let me link tables between modules, which I want to do (the end goal being coordination of inventory purchases based on work orders entered into the system), and in Excel I can show the people using the data where it comes from easily.  Another is that the end users are more familiar with Excel than with Access, so giving them a tool to use that doesn't require learning a new system is preferable.  A third would be my skill in Access; I'm not a database guy but rather someone who has learned bits and pieces over time from exposure.  So don't be surprised if you make a suggestion and I come back with 'how would I go about doing that?'

Thanks in advance for any help you can provide.

  • 0 in reply to Kevin M

    Starting over from scratch with MS Query and the silent DSN doesn't appear to work.  Every time I refresh the table I'm asked for both the user ID and password.  Which suggests to me that neither one is being saved.  I've saved my info in the 'Logon' tab of the silent DSN setup but that doesn't seem to help either.

    I'm using visual basic to re-write the query based on cell contents each time the table refreshes; perhaps I can use some VB code to authenticate.  Any idea if that is in the realm of possibilities?

  • 0 in reply to snowmaker

    It absolutely does work.  Be sure to test your DSN.

    Start with a new spreadsheet so a Refresh All doesn't also try and refresh a SOTAMAS90 query.

  • 0 in reply to Kevin M

    I'm able to connect to the source no problem, I just can't seem to get around entering my user ID and password every time I try to refresh a table.

    Even when I have the connection string pulled up in the driver setup window and verify my user ID and password are in the string, it asks for authentication when I click on Test Connection.

    I tried the new file-MS Query route; it asked for authentication when I connected to the data source and again when I wanted it to return data.  When I hit Refresh it once again wanted username and password.

    At this point I think I'm going to call it a week.  Thanks Kevin/Tyler/Wayne/Rsmcnamara for your pointers, if I end up with some free time next week (this is a side project) I'll jump back into it.

  • 0 in reply to snowmaker

    Okay, so just after trying 'SOTAMAS90_Excel' I tried a different connection I had created, 'Excel_From_MAS' that I SWEAR is identical in setup.  It ran with the user info and password saved without any problem at all.  Is it possible that because I was using a connection that began with the same name as the default connection it reset itself?  No idea.  I'll try setting up multiple queries with this connection next week as time permits and will report back.

    Thanks again all who gave their input.

  • 0 in reply to snowmaker

    If it ask for log in when you test the connection you have the log in information incorrect.

  • 0

    Thanks everyone for the assistance; I've been able to setup what I need without the login popping up.

    If you arrived here via Google, here are a few things that worked for me:

    -Name your silent DSN something dissimilar to SOTOMAS90.  I named mine SOTOMAS90_Excel and feel the similarity could have been a factor in my issue.  Maybe, maybe not, but the different name didn't hurt.

    -Someone somewhere suggested all caps for the username when you save the user ID inside the DSN connection.  It worked for me.

    -I was interested in having dynamic queries in Excel, so I was working in the External Data environment there.  Per Kevin M's suggestion, start from scratch with MS Query to set up the correct connection string in a new Excel document.  Reviewing the string generated this way, there were appreciable syntax differences from my original string using the SOTOMAS90 DSN that I had been trying to modify.  I could go into detail, but setup via MS Query is easy so I'd encourage you to use it!

    -Once the first successful connection was generated, I saved as an external file and used that for my subsequent queries, changing only the SQL statements.

    Good luck!