Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > EXECUTE PROBLEM

Reply
Thread Tools

EXECUTE PROBLEM

 
 
Savas Ates
Guest
Posts: n/a
 
      01-15-2004
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='',fiy at='',tlfiyat='',urunadi='
' where sesid='"&session.SessionID&"' and urunadi='"&delitema(bul)&"'"
baglantimiz.execute(sil)
set rssil= nothing
next


 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      01-15-2004
What is the value of sayac?

Ray at work

"Savas Ates" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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='',fiy at='',tlfiyat='',urunadi='
> ' where sesid='"&session.SessionID&"' and urunadi='"&delitema(bul)&"'"
> baglantimiz.execute(sil)
> set rssil= nothing
> next
>
>



 
Reply With Quote
 
 
 
 
Savas Ates
Guest
Posts: n/a
 
      01-15-2004
value of sayac more than 1

now value of sayac=3


 
Reply With Quote
 
Bob Barrows
Guest
Posts: n/a
 
      01-15-2004
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='',fiy at='',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.


 
Reply With Quote
 
Savas Ates
Guest
Posts: n/a
 
      01-15-2004
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='',fiy at='',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


 
Reply With Quote
 
Savas Ates
Guest
Posts: n/a
 
      01-15-2004
output result is

4
0
update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiy at='',tlfiyat='',urunadi='
' where sesid='891158220' and urunadi='LSZAW002W0'
1
update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiy at='',tlfiyat='',urunadi='
' where sesid='891158220' and urunadi=' L300C-01AC'
2
update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiy at='',tlfiyat='',urunadi='
' where sesid='891158220' and urunadi=' PRS-201'
3
update [sheet3$] set
urunid='',sesid='',num='',marka='',modeladi='',fiy at='',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='',fiy at='',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...


 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      01-15-2004
It says that you cannot use parentheses when calling a Sub.

baglantimiz.Execute sil,, 129

Ray at work

"Savas Ates" <(E-Mail Removed)> wrote in message
news:es0S%(E-Mail Removed)...
> 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='',fiy at='',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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in httphandler using server.execute(please urgent) sathya ASP .Net 1 06-16-2005 12:24 PM
Execute problem with JCreator Mark K Java 13 11-10-2004 05:09 PM
Can i execute aspx file in my asp pag with server.execute method(sorry) Savas Ates ASP General 1 08-17-2004 04:52 PM
Show stopper problem!! Parser Error Message: Execute permission cannot be acquired David Berman ASP .Net 0 06-22-2004 08:37 PM
problem with $dbh->execute in a For loop Ravi Perl 6 10-01-2003 05:15 PM



Advertisments