Archives for Databases

ADODB query from linked table with conditions

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 [...]

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

Dates in PHP and MYSQL

You would think that with PHP and MYSQL having such a lovely relationship that using dates PHP in MYSQL (and vice versa) would be a little more intuitive.  I guess it is intuitive to those who speak UNIX. So say you want to select a recordset between two dates.  Here’s how: //start with a date [...]