EXECUTE PROBLEM

Discussion in 'ASP General' started by Savas Ates, Jan 15, 2004.

  1. Savas Ates

    Savas Ates Guest

    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...
     
    Savas Ates, Jan 15, 2004
    #1
    1. Advertising

  2. Savas Ates

    Ray at Guest

    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" <> wrote in message
    news:...
    > 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...
    >
    >
     
    Ray at, Jan 15, 2004
    #2
    1. Advertising

  3. Savas Ates

    Savas Ates Guest

    only first query executed. others not.. first one is updated but other
    queries not executed.. i m asking why?
     
    Savas Ates, Jan 15, 2004
    #3
  4. Savas Ates

    Ray at Guest

    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" <> wrote in message
    news:...
    > only first query executed. others not.. first one is updated but other
    > queries not executed.. i m asking why?
    >
    >
     
    Ray at, Jan 15, 2004
    #4
  5. Savas Ates

    Savas Ates Guest

    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)...
     
    Savas Ates, Jan 15, 2004
    #5
  6. Savas Ates

    Ray at Guest

    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" <> wrote in message
    news:...
    > 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, Jan 16, 2004
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ravi
    Replies:
    6
    Views:
    474
    Kris Wempa
    Oct 1, 2003
  2. David Berman
    Replies:
    0
    Views:
    1,837
    David Berman
    Jun 22, 2004
  3. sathya
    Replies:
    1
    Views:
    2,833
    John Timney \(ASP.NET MVP\)
    Jun 16, 2005
  4. Mark K

    Execute problem with JCreator

    Mark K, Nov 9, 2004, in forum: Java
    Replies:
    13
    Views:
    3,140
    Andrew Thompson
    Nov 10, 2004
  5. Savas Ates
    Replies:
    1
    Views:
    304
    Patrice
    Aug 17, 2004
Loading...

Share This Page