… | |
… | |
233 | SP += items; |
233 | SP += items; |
234 | |
234 | |
235 | /* first check wether we should use an explicit db handle */ |
235 | /* first check wether we should use an explicit db handle */ |
236 | if (!is_dbh (dbh)) |
236 | if (!is_dbh (dbh)) |
237 | { |
237 | { |
|
|
238 | /* the next line doesn't work - check why later maybe */ |
238 | dbh = get_sv ("DBH", FALSE); |
239 | /* dbh = get_sv ("DBH", FALSE); |
239 | if (!is_dbh (dbh)) |
240 | if (!is_dbh (dbh)) |
240 | { |
241 | {*/ |
241 | dbh = GvSV(DBH); |
242 | dbh = GvSV(DBH); |
242 | if (!is_dbh (dbh)) |
243 | if (!is_dbh (dbh)) |
|
|
244 | croak ("sql_exec: no $DBH argument and no fallback in $PApp::SQL::DBH"); |
243 | croak ("sql_exec: no $DBH found in current package or in PApp::SQL::"); |
245 | /*croak ("sql_exec: no $DBH found in current package or in PApp::SQL::"); |
244 | } |
246 | }*/ |
245 | } |
247 | } |
246 | else |
248 | else |
247 | arg++; /* we consumed one argument */ |
249 | arg++; /* we consumed one argument */ |
248 | |
250 | |
249 | /* count the remaining references (for bind_columns) */ |
251 | /* count the remaining references (for bind_columns) */ |