I have a module failing, which was working 10 minutes ago but now errors with ...
it is defined and was working fine, whats happend?
my code is as follows....
and in Memglobs....
so whats the problem ?????
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
Undefined subroutine &Memglobs::updSQL called at /cgi-bin/Memglobs.pm line 253.
it is defined and was working fine, whats happend?
my code is as follows....
Code:
######################
# Set Error Trapping #
######################
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use warnings;
use strict;
##########################
# Use WIN32::ODBC Module #
##########################
use Win32::ODBC;
##########################
# Set Package Name Space #
##########################
package sql;
################
# Start Module #
################
BEGIN {
# Invoke Exporter
use Exporter;
# Set Variables
our (@ISA, @EXPORT);
@ISA = qw(Exporter);
# Define global vars and subs to be exported
@EXPORT = qw( &getSQL &insSQL &updSQL &delSQL &cntSQL $DSN);
}
##################################################
############## Update SQL Routine ################
##################################################
sub updSQL {
#_0 = Table
#_1 = Values
#_2 = Where
# Set Variables
my ($rowcount);
#Build SQL Statement
my $sel = "UPDATE $_[0] SET $_[1] WHERE $_[2]";
# Open DB Connection
my $db = new Win32::ODBC("FILEDSN=$DSN;") || die "updSQL Error Connecting: " . Win32::ODBC::Error();
# Run SQL Command
if(! $db->Sql("$sel") ) {
# Set rows updated count
$rowcount = $db->RowCount();
#Close DB Connection
$db->Close();
}
else{die "Error in updSQL ($sel)" . Win32::ODBC::Error();}
# Return number of rows updated
$rowcount;
}
###########################
# END OF MODULE RETURN 1; #
###########################
1;
and in Memglobs....
Code:
##################
# Use SQL Module #
##################
use Sql;
so whats the problem ?????
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.