Hi,
I'm in the process of changing over from using DBI, to connect to 5 different databases (LSQL installs). These are all seperate installations on different servers (connected to via IP).
My code looks like;
...and the Links::init() line too. Then, at the bottom of the script, I have a routine to load the SQL object;
my $site = $_[0];
my $path = 'd:/uploads/new_scripts/defs/' . uc($site) . '/defs';
my $NEWDB = new GT::SQL (
def_path => $path,
cache => 0,
debug => 1,
subclass => 1
);
return $NEWDB;
}
This has worked perfectly on another script (which just grabs data from the main database, and then based on a value from that entry, it then distributes to the appropriate database, using the GT::SQL module.
However, in one of my scripts, it just refuses to work :/
nect to database: at d:/inetpub/wwwroot/domainc.om/main/a
dmin/GT/SQL/Driver.pm line 184.
Can't call method "fetchrow" on an undefined value at redistribute.pl line 147.
Anyone got any ideas?
TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
I'm in the process of changing over from using DBI, to connect to 5 different databases (LSQL installs). These are all seperate installations on different servers (connected to via IP).
My code looks like;
Code:
use Links qw/$CFG $DB $IN/;...and the Links::init() line too. Then, at the bottom of the script, I have a routine to load the SQL object;
Code:
sub loadConnection { my $site = $_[0];
my $path = 'd:/uploads/new_scripts/defs/' . uc($site) . '/defs';
my $NEWDB = new GT::SQL (
def_path => $path,
cache => 0,
debug => 1,
subclass => 1
);
return $NEWDB;
}
This has worked perfectly on another script (which just grabs data from the main database, and then based on a value from that entry, it then distributes to the appropriate database, using the GT::SQL module.
However, in one of my scripts, it just refuses to work :/
Quote:
[Thu Apr 14 17:44:24 2005] redistribute.pl: GT:SQL::Table (1244): Could not con nect to database: at d:/inetpub/wwwroot/domainc.om/main/a
dmin/GT/SQL/Driver.pm line 184.
Can't call method "fetchrow" on an undefined value at redistribute.pl line 147.
Anyone got any ideas?

TIA
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!