I have code that looks something like this:
$cmd = new com('ADODB.command');
$cmd->activeConnection = $CONNECTION;
$sql = 'UPDATE MyTable SET WhenPlanned = ? WHERE ID = ?';
$cmd->commandText = $sql;
$p1 = $cmd->createParameter('WhenPlanned', adDate, adParamInput, 0, $dateVal)
$p2 = $cmd->createParameter('ID', adInteger, adParamInput, 4, $intVal);
$cmd->parameters->append($p1);
$cmd->parameters->append($p2);
$cmd->execute();
This only produces the following error: PHP Fatal error: Uncaught exception 'com_exception' with message 'Source: ADODB.Command Description: Application uses a value of the wrong type for the current operation.'
The $dateVal variable is a string representation of a date. I've tried creating a PHP datetime object to pass to no avail...Does anyone know how to pass in a date that the ADO Parameter will accept as an argument in PHP? Thanks!