in reply to ODBC Error - Invalid Cursor State (SQL-24000)
I've run into the same issue, but not using freetds, et. al. Most of the time, I simply open a different handle to the same database for each statement. It won't help you in every case, but it works for me most of the time.
...roboticusmy $DB1 = DBI->connect($DSN,$UID,$PWD); my $DB2 = DBI->connect($DSN,$UID,$PWD); ... my $ST1 = $DB1->prepare("select ID from FOO"); my $ST2 = $DB2->prepare("update FOO set Bar=? where ID=?"); $ST1->execute(); while (my @row = $ST1->fetchrow_array) { $ST2->execute(++$cnt, $row[0]); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ODBC Error - Invalid Cursor State (SQL-24000)
by Anonymous Monk on Sep 03, 2010 at 22:12 UTC | |
by Anonymous Monk on Mar 18, 2011 at 19:32 UTC | |
by mje (Curate) on Mar 21, 2011 at 10:16 UTC |