Why foreach do not print value during every single Insert request in SQL?

Rikki Cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jan 15 04:11:14 PST 2015


On 16/01/2015 1:05 a.m., Suliman wrote:
>          void IMGsInsert(string [] fullimgurl)
>          {
>              foreach (url; fullimgurl)
>              {
>                  string sqlinsert = (sqlrequest)
>                  writeln(sqlinsert);
>                  write("|");
>                  auto rs = stmt.executeUpdate(sqlinsert);
>              }
>
>          }
>
> I expect nice progress indicator "|" which move forward after every
> Insert request.
> Like:
> ||||
> and so on.
>
> The problem that App wait some time and only in prints a heap of "|". Why?

That writeln won't be helping anything. Other then that?
No idea sorry.


More information about the Digitalmars-d-learn mailing list