469,312 Members | 2,496 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,312 developers. It's quick & easy.

DBI and xml:parser

i have created a script that uses the DBI and the XML::Parser modules.
i have created a connection in the main scope and then i create & execute a
statment in one of the start_handler of the xml::parser, along the lines of

$dbh = DBI->connect("my connection");
$xp = new XML:Parser(HANDLERS =>{Start => \&myStartSub}

sub myStartSub {
# creates sql statment
$dbh->do("the sql statment")
}

the problem i'm having is that the sql statment is not executing, it doesn't
return any errors.
if i move the $dbh->do("the sql statment") out of the sub it works fine, but
that's not much good to me up there, it also works if i place $dbh =
DBI->connect("my connection"); inside the sub, but i don't want to be
creating a db connection evertime i parse an element.
How do i get around this?
Mark
Jul 19 '05 #1
0 1475

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Paulo Pinto | last post: by
6 posts views Thread by Don HO | last post: by
2 posts views Thread by Magnus Heino | last post: by
16 posts views Thread by Mike | last post: by
2 posts views Thread by friend.05 | last post: by
8 posts views Thread by Elmar Brandt | last post: by
1 post views Thread by onewaylife | last post: by
2 posts views Thread by Alex | last post: by
3 posts views Thread by Eric Kaplan | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.