abhishes has asked for the wisdom of the Perl Monks concerning the following question:
When doing Win32::ODBC programming can I use one db connection to do 2 queries on the db.
like
$db = new Win32::ODBC("MyDSN"); $db->Sql("select * from table"); while($db->FetchData()) { my $var = $db->Data("column"); $db->Sql("update table2 set col2=\'$var\'"); }
I did not try this code because I am working on quite senstive DB and do not have permissions to create test tables. If one of the update goes wrong then I would be in trouble.
regards,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Query twice
by Tomte (Priest) on Mar 05, 2003 at 21:18 UTC | |
by abhishes (Friar) on Mar 05, 2003 at 22:16 UTC | |
by Tomte (Priest) on Mar 05, 2003 at 22:23 UTC | |
|
Re: Query twice
by dws (Chancellor) on Mar 05, 2003 at 21:42 UTC | |
|
Re: Query twice
by JamesNC (Chaplain) on Mar 06, 2003 at 04:21 UTC | |
|
Re: Query twice
by Cabrion (Friar) on Mar 06, 2003 at 01:16 UTC | |
|
Re: Query twice
by CountZero (Bishop) on Mar 05, 2003 at 21:45 UTC |