Hi Daniel,
I have tried this and it has worked. Instead of a direct update,
prepare a statement and then execute it.
e.g.,
let sql_str =
" UPDATE table_1 SET y = 0 WHERE CURRENT OF ",
cursor_name("p_cursor")
prepare upd_table1 from sql_str
execute upd_table1
Hope this helps.
Gopi.
On 19 Jun 97 at 13:09, Daniel Cernotto wrote:
}
} Hi,
}
} I have this problem:
}
} ----------------------
} DECLARE p_cursor CURSOR WITH HOLD FOR select x from table_1 FOR UPDATE
}
} FOREACH p_cursor INTO variables
}
} SELECT * INTO variables_2 FROM table_2 WHERE variables ....
}
} IF variables_2 THEN
}
} UPDATE table_1 SET y = 0 WHERE CURRENT OF p_cursor
}
} END IF
}
} END FOREACH
} --------------------
}
}
} When I run this program, ERROR -266 occurs
}
} Anyone have any idea?
}
}
} Daniel Cernotto
} DBA
} Aguas Provinciales de Santa Fe
} 1 de Mayo 2832 - (3000) Santa Fe - Argentina
} TE (54) 42 504110
}
}
--------------------------------------------------
Ramdas Gopinath E-mail: rgopi@rankin.com
602-997 6996 X125 Fax: 602-997 4256
--------------------------------------------------