I have been testing DBD::Interbase and it works great woth embperl.
here my testing file:
You must set the database and table to something which exists on your system<br>
or create a database and run the next command:<br>
CREATE TABLE TEST1(<br>
FIRST_NAME VARCHAR(100) NOT NULL,<br>
PRIMARY KEY(FIRST_NAME) )<br>
$table = 'AGENDA' ;
use DBI ;
# Connecting to database
$dbh = DBI->connect("DBI:InterBase:database=C:\CKGTEST.GDB;host=localhost","ckg", "kassab") or die "Cannot connect to '$DSN'" ;
$dbh->do("INSERT INTO $table VALUES ('first name to be deleted','last name to be deleted')");
#Insert Data again
$dbh->do("INSERT INTO $table VALUES ('first name will not be deleted','last name will not be deleted')");
$dbh->do("DELETE FROM AGENDA WHERE FIRST_NAME = 'first name to be deleted'");
#$dbh->do("DELETE FROM AGENDA WHERE FIRST_NAME = 'first name will not be deleted'");
# Get Data
$sth = $dbh -> prepare ("SELECT FIRST_NAME, LAST_NAME FROM $table") or die "Cannot SELECT from '$table'" ;
$sth -> execute or die "Cannot execute SELECT from '$table'";
$sth -> bind_columns(undef, \$first_name, \$last_name);
<th>First Name</th><th>Last Name</th>
[$ while $sth -> fetchrow_arrayref $]
<td>[+ $first_name +]</td><td>[+ $last_name +]</td>
[$ endwhile $]
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.