[Templates] Using DBI plugin to access a remote database
Dave Howorth
dhoworth@mrc-lmb.cam.ac.uk
Tue, 12 Sep 2006 14:41:10 +0100
Jeremiah Foster wrote:
> I am using a plugin with TT, the DBI interface and I am having trouble
> accessing a remote host. If I slip the remote host in with my dbh
> definition the program hangs despite the fact that the SQL works, the
> remote host is reachable, the pass and user correct, etc. (Tested from
> the command line.)
>
> Is there a syntax for adding a remote host in the foo.tt file to access
> a database that I should know? Or do I have to do everything from the
> local host?
There's nothing special I know of. Just give the DSN to USE DBI:
USE DBI( my_dsn );
If you're doing that already, then double-check what user you're running
as and whether that user has permissions. If this isn't what you're
doing, posting some of your code would be useful.
Cheers, Dave