mnlight has asked for the wisdom of the Perl Monks concerning the following question:
sub change_dboption_true(){ my ( $dbh, $DB ) = @_; my $option = "single user"; my $switch = "true"; my $sql; $sql = "use master"; $$dbh->do($sql) or $app->error($FATAL,"Can't do SQL statement [ $s +ql ] :: $DBI::errstr"); FAILS HERE $sql = "sp_dboption $DB, \"$option\", $switch"; $$dbh->do($sql) or $app->error($FATAL,"Can't do SQL statement [ $s +ql ] :: $DBI::errstr"); $sql = "use $DB"; $$dbh->do($sql) or $app->error($FATAL,"Can't do SQL statement [ $s +ql ] :: $DBI::errstr"); $sql = "checkpoint"; $$dbh->do($sql) or $app->error($FATAL,"Can't do SQL statement [ $s +ql ] :: $DBI::errstr"); $$dbh->disconnect; }#end change_dboption_true
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: multiple commands in database
by thezip (Vicar) on Jan 16, 2003 at 21:10 UTC | |
by mpeppler (Vicar) on Jan 16, 2003 at 22:41 UTC | |
|
Re: multiple commands in database
by mpeppler (Vicar) on Jan 16, 2003 at 22:38 UTC | |
|
Re: multiple commands in database
by poj (Abbot) on Jan 16, 2003 at 22:29 UTC |