EXECUTE PROBLEM

S

Savas Ates

only first query executed..

code is

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

sil="update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiyat='',tlfiyat='',urunadi='
' where sesid='"&session.SessionID&"' and urunadi='"&delitema(bul)&"'"
response.write sil&"<br>"
baglantimiz.execute(sil)

next



output result is

4
0
update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiyat='',tlfiyat='',urunadi='
' where sesid='891158220' and urunadi='LSZAW002W0'
1
update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiyat='',tlfiyat='',urunadi='
' where sesid='891158220' and urunadi=' L300C-01AC'
2
update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiyat='',tlfiyat='',urunadi='
' where sesid='891158220' and urunadi=' PRS-201'
3
update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiyat='',tlfiyat='',urunadi='
' where sesid='891158220' and urunadi=' STR-400-1V'


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

Ray at

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
 
S

Savas Ates

only first query executed. others not.. first one is updated but other
queries not executed.. i m asking why?
 
R

Ray at

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
 
S

Savas Ates

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)...
 
R

Ray at

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
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top