Sure. I'll describe what happens using the application interface, because things change a bit with AMS running as a service, or accessed via the web admin interface. This will seem redundant and silly, but it's a sure way to find the bug.
Testing The Bug:1. Make sure that a valid ODBC is set up; in Windows, Start -> Administrative tools -> Data source (ODBC); I'm using
MySQL, so
I use their connector to create and configure a
System DSN, and their interface for testing it. My example will use mailodbc as the DSN name. ALWAYS TEST THE ODBC INDEPENDENTLY, FROM ANOTHER APP! Mine works, using the MySQL connector test function.
2. In the AMS app, Click Settings. Then go to General -> ODBC. Click the ODBC radio button.
3. Enter the Connect String as
DSN=mailodbc- note: do NOT use ANY brackets of any type, no < or >, no quotes, nothing else! Enter it exactly as shown in my example. (There has been some confusion about that.)
4. Enter the database table and field (column) names, as appropriate for your database.
I am not using the defaults, and the table already exists. I'll paste in my table create statement at the end of this post.
5. Click the
Test Database button! If it works, you'll get a dialog (popup) saying so, and you should be good to go, even if you need to create the table using the button provided.
However, if this bug is in play on your system, the
Test Database function, or the create table function, will result in an
hourglass or spinning cursor (Win 7). It will churn for a bit, and then Windows will tell you that
the application has crashed! I do not recall the exact language, and don;t want to kill my server to snag a screen shot - will do that on your request, though.
Sure enough, if AMS was running as an application, you'll have to re-run it. Note that the ODBC change will not have been placed in effect, which is a really good thing. Otherwise, you'd have to manually edit config files or uninstall and reinstall AMS to fix this. That's where you're in real trouble here, Chris -
with AMS running as a service and accessed via the web interface, the "Use ODBC" selection WILL be implemented! But then the service will crash, just as the application did! Maybe the watchdog service kicks in and restarts it, but it will never actually work! Infinite recursion. Crash. Watchdog. Crash. Watchdog. Etc.
The fix:1. If AMS is running, shut it down (exit the app or stop the service).
2. In Windows Explorer, browse to the AMS install folder; in my case, that's C:\Code-Crafters\Ability Mail Server 3
3.
Rename the following two files: odbc32.dll and odbcint.dll- note: It does not matter what you change the names to. You can change .dll to something impossible, like .bad_dll, or simply change the base file name. I used odbc32-ams.dll and odbcint-ams.dll. You can also move the files to another folder. I would not delete them, but that would also work. The whole point is to make it impossible for AMS to actually use those DLL files, and to force it to use the counterparts provided by the OS (Win 7 in my case).
4. Restart AMS; relaunch the app, restart the service, or reboot the computer.
5. Repeat the test sequence above ("Test The Bug").
This fix worked for me.
Hope that info is what you wanted or needed.
Here's the create query for my table. Please note that with AMS2, I had trouble with the enabled field defined as a BIT. Changing it to TINYINT fixed that. With AMS3, I left the same table in place, and AMS 3likes it just fine, so I didn't take any chances with it. (Plus, I have my own code expecting these field names.)
- Code: Select all
CREATE TABLE `sitegate`.`mail_users` (
`strdomain` varchar(100) NOT NULL,
`struser` varchar(100) NOT NULL,
`strpass` varchar(100) DEFAULT NULL,
`strgroup` varchar(100) NOT NULL DEFAULT '',
`strdir` varchar(255) NOT NULL,
`intenabled` tinyint(3) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`strdomain`,`struser`,`strgroup`,`intenabled`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Thanks!
Colin