I spent (too many) hours today trying to figure out why I couldn’t get a query to run through ADODB from an HTA I’m working on. The query pulls from a linked table which links to a tab-delimited text file, and the query had a WHERE condition as such: WHERE field1 LIKE “00*” Apparently, I [...]
Archives for Databases
Run MS Access Macro with Javascript in HTA
Combined examples from this site and that site to make the following: var oAccess = new ActiveXObject(‘Access.Application’); oAccess.Visible = false; oAccess.OpenCurrentDatabase(‘c:\\path\\database.mdb’); oAccess.DoCmd.RunMacro(‘NameOfMacro’); oAccess.Quit(2); //2 = acQuitSaveNone option for save command oAccess = null;
ADODB CursorType when recordset opened through command object
Well, this would have been nice to know an hour ago. CursorType and LockType on a recordset can’t be changed when it is opened through a command object. My favorite part: “This behavior is by design.” PRB: Use Open Method to Change CursorType and LockType