You must use DBI.

Ilya Sterin

-----Original Message-----
From: Roberto Slepetys Ferreira
To: Sterin, Ilya; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: 4/11/01 10:39 AM
Subject: Re: PERLCC and DBI

Hi Sterin,
The problem continues...

I changed the use part to use DBD:mysql - that works fine in perl, but
continues to give-me an error with perlcc as below:

Can't locate object method "connect" via package "DBI" (perhaps you
forgot
to load "DBI"?) at teste.pl line 9.

The script is writen below:

#!/usr/bin/perl

use CGI qw(:standard);
use DBD::mysql;


print header;

  my $db1 = DBI->connect("DBI:mysql:xxxx", "xxxx", "xxxx");
  my $sql = "SHOW tables;";
  my $tarefa = $db1->prepare($sql);
   $tarefa->execute();
      while ($saida  = $tarefa -> fetchrow_array){
  print $saida."\n";
   }
 $tarefa -> finish();
 $db1->disconnect;

print "Teste\n";
 exit(0);

[]s
Slepetys

Reply via email to