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.
| Author |
Topic |
|
yossibaram
Yak Posting Veteran
82 Posts |
Posted - 2002-10-31 : 10:21:12
|
| Hi,I am converting my VB app from Access to sql server.Many times in my code i useDo Until recordset.EOF .... .... recordset.MoveNextLoopCan i create the same loop in a SP??ThanksYossi |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-10-31 : 10:23:25
|
| Sure, if you want it to perform very, very badly.Can you post the code you're trying to convert, and a description of what you're trying to accomplish with it?Edited by - robvolk on 10/31/2002 10:24:18 |
 |
|
|
yossibaram
Yak Posting Veteran
82 Posts |
Posted - 2002-10-31 : 10:32:25
|
Hi an example:Do Until recordset.EOF call SP_2 buffrecordset.MoveNext Loop This small ex runs through a recordset and call each time a second SP that do a manipulation on the record. ThanksYossiquote: Sure, if you want it to perform very, very badly.Can you post the code you're trying to convert, and a description of what you're trying to accomplish with it?Edited by - robvolk on 10/31/2002 10:24:18
|
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2002-10-31 : 10:37:01
|
| If you post the procedure that is actually called, or explain what the manipulation is, folk might be able to recode it to work without using a loop. |
 |
|
|
yossibaram
Yak Posting Veteran
82 Posts |
Posted - 2002-10-31 : 11:03:10
|
Hi,Sorry for not clarifying myself.SP_2 contains - Print #FileName , fileld1 & field2....All i need to do is looping inside a specific recordset and print each record as a line into a text file.If you have any sugestion please advice.Do you never loop a recordset?ThanksYossiquote: If you post the procedure that is actually called, or explain what the manipulation is, folk might be able to recode it to work without using a loop.
|
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-10-31 : 11:12:13
|
| I never loop a recordset. Haven't done a recordset loop in over 3 years.If you need to output data from a table into a text file, check out bcp or DTS:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=21175You can use the queryout setting to output only the columns you need. |
 |
|
|
yossibaram
Yak Posting Veteran
82 Posts |
Posted - 2002-10-31 : 11:17:10
|
In time (not much i hope),I will improove my design skills.I will check into your advise.Thanks abunchYossiquote: I never loop a recordset. Haven't done a recordset loop in over 3 years.If you need to output data from a table into a text file, check out bcp or DTS:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=21175You can use the queryout setting to output only the columns you need.
|
 |
|
|
|
|
|
|
|