Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   unable to connect to database(MS access) (http://www.go4expert.com/forums/unable-connect-database-ms-access-t3788/)

bhavin12300 7Apr2007 19:13

unable to connect to database(MS access)
 
hi
i am building .pl script to get connect to database which is in MS access in windows
but i am able to fetch data from it .it prints nothign.
here is the code

$db="emaildb";

$dbh=DBI->connect("dbi:ADO:$db",'','');

$sq="select * from emaillists";
$qry=$dbh->prepare($sq);
$qry->execute();
while(@data = $qry->fetchrow_array()){
print @data[1];
}

i have created DSN with this database in windows
wating plzzzzzzzzzz

pradeep 11Apr2007 13:45

Re: unable to connect to database(MS access)
 
check whether its connecting or not...

Code: Perl

$dbh=DBI->connect("dbi:ADO:$db",'','') or die("$!");



All times are GMT +5.5. The time now is 19:31.