Velocity Reviews > EXECUTE PROBLEM

# EXECUTE PROBLEM

Savas Ates
Guest
Posts: n/a

 01-15-2004
only first query executed..

code is

Response.Write sayac & "<BR>"
for bul=0 to sayac-1
Response.Write bul & "<BR>"

sil="update [sheet3\$] set
' where sesid='"&session.SessionID&"' and urunadi='"&delitema(bul)&"'"
response.write sil&"<br>"
baglantimiz.execute(sil)

next

output result is

4
0
update [sheet3\$] set
' where sesid='891158220' and urunadi='LSZAW002W0'
1
update [sheet3\$] set
' where sesid='891158220' and urunadi=' L300C-01AC'
2
update [sheet3\$] set
' where sesid='891158220' and urunadi=' PRS-201'
3
update [sheet3\$] set
' where sesid='891158220' and urunadi=' STR-400-1V'

still only first query executed. what is the problem...

Ray at
Guest
Posts: n/a

 01-15-2004
What makes you think that it isn't executing. If your code is what you have
below, it's executing. Do you have an On Error Resume Next anywhere?

Ray at work

"Savas Ates" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> only first query executed..
>
> code is
>
> Response.Write sayac & "<BR>"
> for bul=0 to sayac-1
> Response.Write bul & "<BR>"
>
> sil="update [sheet3\$] set
>

> ' where sesid='"&session.SessionID&"' and urunadi='"&delitema(bul)&"'"
> response.write sil&"<br>"
> baglantimiz.execute(sil)
>
> next
>
>
>
> output result is
>
> 4
> 0
> update [sheet3\$] set
>

> ' where sesid='891158220' and urunadi='LSZAW002W0'
> 1
> update [sheet3\$] set
>

> ' where sesid='891158220' and urunadi=' L300C-01AC'
> 2
> update [sheet3\$] set
>

> ' where sesid='891158220' and urunadi=' PRS-201'
> 3
> update [sheet3\$] set
>

> ' where sesid='891158220' and urunadi=' STR-400-1V'
>
>
> still only first query executed. what is the problem...
>
>

Savas Ates
Guest
Posts: n/a

 01-15-2004
only first query executed. others not.. first one is updated but other
queries not executed.. i m asking why?

Ray at
Guest
Posts: n/a

 01-15-2004
And I'm asking how know they aren't executed and if you have an on error
resume next statement.

For i = 1 to 10
response.write "x"
response.write "y"
Next

That's the basic layout of your code. You will ALWAYS see x and y both, not
just one of them.

Ray at work

"Savas Ates" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> only first query executed. others not.. first one is updated but other
> queries not executed.. i m asking why?
>
>

Savas Ates
Guest
Posts: n/a

 01-15-2004
because im looking at my excell and seeing you only first record updated in
my lotf of queries... im running asp files and seeing the results of asp in
excell (my data stored here)...

Ray at
Guest
Posts: n/a

 01-16-2004
My guess is that the only update you're seeing is the ~last~ one, because
you do not have a WHERE clause in your sql statement. So, if you executed:

For i = 1 to 3
o.Execute "update [table] set [someColumn]=" & i
Next

It would first set them all to 1, then 2, and then 3. So you wouldn't see
any 1s or 2s ever.

Ray at work

"Savas Ates" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> because im looking at my excell and seeing you only first record updated

in
> my lotf of queries... im running asp files and seeing the results of asp

in
> excell (my data stored here)...
>
>