Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Cursor or NOT Cursor

Author  Topic 

CLages
Posting Yak Master

116 Posts

Posted - 2004-02-02 : 04:49:18
Some people here says that "SQL is good if you dont use Cursor"
other says "Dont use cursor" , etc

Then i ask you.

How can i Populate a Listview without using Cursor to fetch one by one row?

In other words, i need to populate a listview with several rows, but
i need to check each row first before sent to listview.

this is because if i use SELECT instead CURSOR, SELECT retuns several rows at same time, and i need to check one by one first.

by the way i am using embebbed SQL.

tks
Carlos Lages

nr
SQLTeam MVY

12543 Posts

Posted - 2004-02-02 : 05:14:12
Should use stored procs.

SQL Server will always return a cursor to a client (i.e. on ordered rusultset) for processing in the application language - which is probably designed to handle cursors rather than perform set based processing.
What you should avoid is declaring explicit cursors in sql.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -