![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Re: ExecuteReader Blocks Inserts on a Table Charles Law wrote: Quote: > I have a sproc that returns data from a table using a simple SELECT. > There are quite a few rows returned, e.g. ~150,000. > > In my first application, I use a reader on the sproc and iterate > through the rows, writing them out to a file. This takes about 5 > minutes until I close the reader. while moreRecords begin read record write record to file end then maybe the writing to disk is the slow step, so how about while moreRecords begin read record append record to stringbuilder end write stringbuilder to file ? I take it getting the sp to write to a file is not an option? Andrew |
My System Specs![]() |
| | #2 (permalink) |
| | Re: ExecuteReader Blocks Inserts on a Table Hi Andrew Because of the speed of the connection, I think the extended times are simply because of the time it takes to transfer that many records down the wire. The file write is almost certainly not the slow bit. If the sproc were to create the file then it would end up server-side, and I need it client-side. Copying it would take much longer than the current 5 minutes. Charles "Andrew Morton" <akm@xxxxxx-press.co.uk.invalid> wrote in message news:6bupvpF3bsrauU1@xxxxxx Quote: > Charles Law wrote: Quote: >> I have a sproc that returns data from a table using a simple SELECT. >> There are quite a few rows returned, e.g. ~150,000. >> >> In my first application, I use a reader on the sproc and iterate >> through the rows, writing them out to a file. This takes about 5 >> minutes until I close the reader. > If you are doing > > while moreRecords > begin > read record > write record to file > end > > then maybe the writing to disk is the slow step, so how about > > while moreRecords > begin > read record > append record to stringbuilder > end > write stringbuilder to file > > ? > > I take it getting the sp to write to a file is not an option? > > Andrew > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Typed datasets and table table adapters components not showing inToolbox | .NET General | |||
| how do you create a dynamic table/pivot table | .NET General | |||
| The mail I send inserts *****spam***** in the subject line?? | Vista mail | |||
| Windows Mail does not do hyperlink inserts | Vista mail | |||
| not able to attach photos, only inserts directly in mail | Live Mail | |||