EXECUTE PROBLEM

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

  1. Savas Ates

    Savas Ates Guest

    iam using codes which only execute first query. in loop other queries i can
    write screen them but only first query making executed.. why?

    for bul=0 to sayac-1

    set rssil=server.CreateObject("adodb.recordset")
    sil="update [sheet3$] set
    urunid='',sesid='',num='',marka='',modeladi='',fiyat='',tlfiyat='',urunadi='
    ' where sesid='"&session.SessionID&"' and urunadi='"&delitema(bul)&"'"
    baglantimiz.execute(sil)
    set rssil= nothing
    next
     
    Savas Ates, Jan 15, 2004
    #1
    1. Advertising

  2. Savas Ates

    Ray at Guest

    What is the value of sayac?

    Ray at work

    "Savas Ates" <> wrote in message
    news:...
    > iam using codes which only execute first query. in loop other queries i

    can
    > write screen them but only first query making executed.. why?
    >
    > for bul=0 to sayac-1
    >
    > set rssil=server.CreateObject("adodb.recordset")
    > sil="update [sheet3$] set
    >

    urunid='',sesid='',num='',marka='',modeladi='',fiyat='',tlfiyat='',urunadi='
    > ' where sesid='"&session.SessionID&"' and urunadi='"&delitema(bul)&"'"
    > baglantimiz.execute(sil)
    > set rssil= nothing
    > next
    >
    >
     
    Ray at, Jan 15, 2004
    #2
    1. Advertising

  3. Savas Ates

    Savas Ates Guest

    value of sayac more than 1

    now value of sayac=3
     
    Savas Ates, Jan 15, 2004
    #3
  4. Savas Ates

    Bob Barrows Guest

    Time for some debugging. See below:
    Savas Ates wrote:
    > iam using codes which only execute first query. in loop other queries
    > i can write screen them but only first query making executed.. why?
    >



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


    Response.Write bul & "<BR>"
    >

    The following line is not needed
    > set rssil=server.CreateObject("adodb.recordset")


    > sil="update [sheet3$] set
    >

    urunid='',sesid='',num='',marka='',modeladi='',fiyat='',tlfiyat='',urunadi='
    > ' where sesid='"&session.SessionID&"' and
    > urunadi='"&delitema(bul)&"'"


    Response.Write sil & "<BR>"

    This:
    > baglantimiz.execute(sil)

    should be this:
    baglantimiz.execute(sil,,129) 'adCmdText + adExecuteNoRecords

    The following line is not needed
    > set rssil= nothing


    > next


    Run the page and look at the results of the response.write statements. If
    they don't show you what is wrong, show them to us.

    HTH,
    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows, Jan 15, 2004
    #4
  5. Savas Ates

    Savas Ates Guest

    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,,129) 'adCmdText + adExecuteNoRecords


    next


    cant use , call a sub
    error line baglantimiz.execute(sil,,129) 'adCmdText + adExecuteNoRecords
     
    Savas Ates, Jan 15, 2004
    #5
  6. Savas Ates

    Savas Ates Guest

    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'

    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

    still only first query executed. what is the problem...
     
    Savas Ates, Jan 15, 2004
    #6
  7. Savas Ates

    Ray at Guest

    It says that you cannot use parentheses when calling a Sub.

    baglantimiz.Execute sil,, 129

    Ray at work

    "Savas Ates" <> wrote in message
    news:es0S%...
    > 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,,129) 'adCmdText + adExecuteNoRecords
    >
    >
    > next
    >
    >
    > cant use , call a sub
    > error line baglantimiz.execute(sil,,129) 'adCmdText + adExecuteNoRecords
    >
    >
     
    Ray at, Jan 15, 2004
    #7
    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,838
    David Berman
    Jun 22, 2004
  3. sathya
    Replies:
    1
    Views:
    2,835
    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,145
    Andrew Thompson
    Nov 10, 2004
  5. Savas Ates
    Replies:
    1
    Views:
    307
    Patrice
    Aug 17, 2004
Loading...

Share This Page