#!/usr/bin/perl -w
use strict;
use DBI;
my $dbh  = DBI->connect('dbi:AnyData(RaiseError=1):');
$dbh->ad_catalog('Login','CSV','Login.csv');
my $data = {Password=>'raman',Session_ID=>'8ada23',Image_X=>55};
my @cols = qw(Password Session_ID Image_X);
my @vals = @$data{@cols};
my $colStr   = join ',', @cols;
my $paramStr = join ',', ('?')x@cols;
$dbh->do("DROP TABLE IF EXISTS Login");
$dbh->do("CREATE TABLE Login (Password TEXT,Session_ID TEXT, Image_X INT)");
$dbh->do("INSERT INTO Login ($colStr) VALUES ($paramStr)",{},@vals);
my $sth=$dbh->prepare("SELECT Password FROM Login WHERE Image_X=?");
$sth->execute(55);
$sth->dump_results;
$sth->{Active}=0; # temporary workaround for DBD::File bug
