egroupware/phpgwapi/inc/adodb/tests/test2.php

26 lines
574 B
PHP
Raw Normal View History

2003-10-19 21:05:23 +02:00
<?php
2005-09-26 12:12:10 +02:00
// BASIC ADO test
2003-10-19 21:05:23 +02:00
2005-09-26 12:12:10 +02:00
include_once('../adodb.inc.php');
2003-10-19 21:05:23 +02:00
2005-09-26 12:12:10 +02:00
$db = &ADONewConnection("ado_access");
$db->debug=1;
$access = 'd:\inetpub\wwwroot\php\NWIND.MDB';
$myDSN = 'PROVIDER=Microsoft.Jet.OLEDB.4.0;'
. 'DATA SOURCE=' . $access . ';';
echo "<p>PHP ",PHP_VERSION,"</p>";
$db->Connect($myDSN) || die('fail');
print_r($db->ServerInfo());
try {
$rs = $db->Execute("select $db->sysTimeStamp,* from adoxyz where id>02xx");
print_r($rs->fields);
} catch(exception $e) {
print_r($e);
echo "<p> Date m/d/Y =",$db->UserDate($rs->fields[4],'m/d/Y');
}
?>