4gl, cursor and count
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hello, i have a cursor and i want to now how many records are inside this. I don't now the syntax and I couldn't find something in the handbooks. Can anyone help me? Please excuse my english. -- cu Frank Fischer
OK my memory is a bit foggy on this one but once you have opened the cursor can't you check one of the values of SQLCA record to see how many rows were selected. Can someone flesh out my memory???...I'm having sometimers disease... OPEN cursor_name Let l_num_rows = SQLCA. something... Obnoxio, Art, Someone??? Rob Vorbroker Frank Fischer <FischerF@lsv-gartenbau.de> wrote in message news:39D0A8DD.D7492DEB@lsv-gartenbau.de... > Hello, > i have a cursor and i want to now how many records are inside this. > I don't now the syntax and I couldn't find something in the handbooks. > Can anyone help me? > Please excuse my english. > -- > > cu > Frank Fischer
In article <8qqedh$7tpi$1@newssvr05-en0.news.prodigy.com>, ROBERT B VORBROKER <ROBVORBROKER@prodigy.net> writes > >OK my memory is a bit foggy on this one but once you have opened the cursor >can't you check one of the values of SQLCA record to see how many rows were >selected. >Can someone flesh out my memory???...I'm having sometimers disease... > >OPEN cursor_name >Let l_num_rows = SQLCA. something... > >Obnoxio, Art, Someone??? Maybe, maybe not. AFAIK if the SQL behind the cursor doesn't need a temp table to produce the results (no ORDER BY on a single table query) it will just keep sending the rows back until there are no more to send. > >Rob Vorbroker >Frank Fischer <FischerF@lsv-gartenbau.de> wrote in message >news:39D0A8DD.D7492DEB@lsv-gartenbau.de... >> Hello, >> i have a cursor and i want to now how many records are inside this. >> I don't now the syntax and I couldn't find something in the handbooks. >> Can anyone help me? >> Please excuse my english. >> -- >> >> cu >> Frank Fischer > > -- Surfer!
The number of rows processed (in select, or delete, or update) can be obtained using in the sqlca.sqlerrd[2] into a variable within the application. Or you can use the DBINFO function, as above: let v_variable = dbinfo(`sqlca.sqlerrd2`) Hope this helps. Paulo Matheus In article <8qqedh$7tpi$1@newssvr05-en0.news.prodigy.com>, "ROBERT B VORBROKER" <ROBVORBROKER@prodigy.net> wrote: > > OK my memory is a bit foggy on this one but once you have opened the cursor > can't you check one of the values of SQLCA record to see how many rows were > selected. > Can someone flesh out my memory???...I'm having sometimers disease... > > OPEN cursor_name > Let l_num_rows = SQLCA. something... > > Obnoxio, Art, Someone??? > > Rob Vorbroker > Frank Fischer <FischerF@lsv-gartenbau.de> wrote in message > news:39D0A8DD.D7492DEB@lsv-gartenbau.de... > > Hello, > > i have a cursor and i want to now how many records are inside this. > > I don't now the syntax and I couldn't find something in the handbooks. > > Can anyone help me? > > Please excuse my english. > > -- > > > > cu > > Frank Fischer > > Sent via Deja.com http://www.deja.com/ Before you buy.