develooper Front page | perl.beginners | Postings from April 2002

DBD-ODBC - WIN2K - ACCESS

Thread Next
From:
Eduardo Cancino
Date:
April 26, 2002 07:31
Subject:
DBD-ODBC - WIN2K - ACCESS
Message ID:
NIEJKGLINEACKOOBHCAMAEDACGAA.lalo@ciceana.org.mx
HI.

I'm having this problem I have a memo field that i use for the main text and
when i access it my script just prints a blank page, but when the field is
reduced my scripts prints exactly as i want to:

You know why??

SOME CODE
#!c:/perl/bin/perl.exe

# cargar modulos
use DBI;
use CGI qw(:standard);
use CGI::Carp ('fatalsToBrowser');

# configuracion
my $num = param('num');
my $database = 'database';
my $user = 'user';
my $passw = 'password';

# conectarse a base de datos
my $dbh = DBI->connect ( "dbi:ODBC:$database", "$user", "$passw" ) or die
"No pude conectarme : $DBI::errstr\n";
my $sth = $dbh->prepare( "
			SELECT id, titulo, parrafo, fecha FROM noticias
			WHERE id = $num
			" );
$sth->execute();

print header();

print param('id');
while ( (my $id, my $name, my $par, my $time) = $sth->fetchrow) {
	print start_html(-title=>"Noticia:
$name",-style=>({-src=>"/_include/portal.css"}));
	print h3("$name"),
		p("$par"),
		#p("$par1"),
		p("$time"),
		p(a({-href=>'/noticias/index1.shtml'},'<<indice de noticias'));
}
print end_html;



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About