2 |
## $Id$ |
## $Id$ |
3 |
## -------------------------------------------------------------------------------- |
## -------------------------------------------------------------------------------- |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.3 2002/07/27 00:28:20 cvsjoko |
6 |
|
## bugfixes |
7 |
|
## |
8 |
## Revision 1.2 2002/07/20 11:09:58 cvsjoko |
## Revision 1.2 2002/07/20 11:09:58 cvsjoko |
9 |
## + bugfixes |
## + bugfixes |
10 |
## + dont' print sql-errors |
## + dont' print sql-errors |
176 |
my $bool_ok; |
my $bool_ok; |
177 |
if (connectTarget($dbmeta)) { |
if (connectTarget($dbmeta)) { |
178 |
sendSql($sql); |
sendSql($sql); |
179 |
#print "state: ", $dbmeta->{dbh}->errstr, "\n"; |
#print "state: ", $dbmeta->{dbh}->state, "\n"; |
180 |
$bool_ok = ($dbmeta->{dbh} && $dbmeta->{dbh}->state && !$dbmeta->{dbh}->err); |
#print "err ", $dbmeta->{dbh}->err, "\n"; |
181 |
|
#$bool_ok = ($dbmeta->{dbh} && $dbmeta->{dbh}->state && !$dbmeta->{dbh}->err); |
182 |
|
$bool_ok = ($dbmeta->{dbh} && !$dbmeta->{dbh}->err); |
183 |
disconnectTarget($dbmeta); |
disconnectTarget($dbmeta); |
184 |
} |
} |
185 |
return $bool_ok; |
return $bool_ok; |
192 |
my $sql; |
my $sql; |
193 |
$sql = "CREATE DATABASE $dbname;"; |
$sql = "CREATE DATABASE $dbname;"; |
194 |
if ( sqlDbAction($dsn, $sql) ) { |
if ( sqlDbAction($dsn, $sql) ) { |
195 |
print "ok"; |
print "ok", "\n"; |
196 |
|
return 1; |
197 |
} else { |
} else { |
198 |
print "failed"; |
print "failed", "\n"; |
199 |
|
return 0; |
200 |
} |
} |
|
print "\n"; |
|
201 |
} |
} |
202 |
|
|
203 |
sub dropSqlDb { |
sub dropSqlDb { |
225 |
return 1 if ($bool_tablesHere); |
return 1 if ($bool_tablesHere); |
226 |
} |
} |
227 |
|
|
|
1; |
|
228 |
|
1; |