Re: [Templates] Pulling no data using TT book example

[prev] [thread] [next] [Date index for 2004/10/23]

From: Ovid
Subject: Re: [Templates] Pulling no data using TT book example
Date: 03:08 on 23 Oct 2004
--- Robert <sigzero@xxxxx.xxx> wrote:

> I am using the TT book. On page 357, Example 9-1 it describes how to
> get a
> product listing. My code follows that example:
> 
> [% USE DBI("dbi:Oracle:ELLTST", "*****", "*****") -%]
> 
> [% FOREACH user = DBI.query("SELECT surname, first_name FROM msf810")
> -%]
>     <tr><td>[% user.surname %]</td><td>[% user.first_name
> %]</td></tr>
> 
> [% END -%]

Well, of course you're not getting any data, silly.  You're using
asterisks for the username and password! :)

Have you tried using that data souce in a regular Perl script to see if
it's configured correctly?

You can also use [% DBI.error %] to see if that has more information.

Cheers,
Ovid

=====
Silence is Evil            http://users.easystreet.com/ovid/philosophy/decency.html
Ovid                       http://www.perlmonks.org/index.pl?node_id=17000
Web Programming with Perl  http://users.easystreet.com/ovid/cgi_course/

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

Re: [Templates] Pulling no data using TT book example
Ovid 03:08 on 23 Oct 2004

Re: [Templates] Pulling no data using TT book example
Charles Jardine 11:03 on 23 Oct 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52