SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 141 | Next

Deepak Vohra

"Ajax in Oracle JDeveloper"

" added a row\n\n";
}
$sql = "INSERT INTO OE.Catalog VALUES('catalog2',
'Oracle Magazine', 'Oracle Publishing', 'Nov-Dec
2004', 'From ADF UIX to JSF', 'Jonas Jacobi')";
$stmt = oci_parse($connection, $sql);
if (!$stmt) {
166 8 Ajax with PHP-Xajax
$e = oci_error($connection);
echo htmlentities($e['message']);
}
$r = oci_execute($stmt);
if (!$r) {
$e = oci_error($stmt);
echo htmlentities($e['message']);
}else{
echo $connection . " added a row\n\n";
}
$sql = "INSERT INTO OE.Catalog VALUES('catalog3',
'Oracle Magazine', 'Oracle Publishing', 'March-
April 2005', 'Starting with Oracle ADF ', 'Steve
Muench')";
$stmt = oci_parse($connection, $sql);
if (!$stmt) {
$e = oci_error($connection);
echo htmlentities($e['message']);
}
$r = oci_execute($stmt);
if (!$r) {
$e = oci_error($stmt);
echo htmlentities($e['message']);
}else{
echo $connection . " added a row\n\n";
}
?>
If the HOST, PORT or SERVICE_NAME are different than those
specified in the PHP script, modify the settings in the script. Start Apache
web server, if not already started. Run the PHP script in JDeveloper.
Right-click on createTable.php and select Run as shown in Fig. 8.6
8.5 Sending an Ajax Request 167
Fig. 8.6 Running a PHP Script
A database table, Catalog, gets generated and data gets added to the
table.
8.5 Sending an Ajax Request
We shall develop an example application comprising of an input form.


Pages:
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153