Re: Update cursors
Posted in 1991
Joe Tokarski, in your mail you wrote: > > I have a question about using cursors for update. > > What I seem to need to do is to PREPARE my select statement as such: > > sprintf(buf, "select colx, coly, colz from tab1 where cola = ? and colb = ?"); > $prepare stmt1 from buf; > > So far, so good. Now I try to declare my cursor for update: > > $declare curs1 for stmt1 for update; > > The problem is that the compiler squawks about a > "Syntax error on keyword or symbol ';'. (sqlhost.y) > "esqlc: internal error; sqlsetbuffer sql_buffer=3" > Try these two lines... $prepare stmt1 from "select colx, coly, colz from tab1 where cola = ? and colb = ? for update"; $declare curs1 cursor for stmt1; DAS -- David A. Snyder @ UE&C - Catalytic in Philadelphia, PA UUCP: ..!uunet!trac2000!das INTERNET: das@trac2000.ueci.com