Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > If statment doesn't work, why ?

Thread Tools

If statment doesn't work, why ?

Carlos Fernandes
Posts: n/a
Why when i awsner N in my if statment it also inserts data in my db ?


....asp code...
nr=inputbox("S/N." )
if ucase(nr)="S" then
document.write "<%Set RS = Server.CreateObject ("ADODB.Recordset")%>"
document.write "<%RS.Open "reuniao", DB, 1,2 %>"
document.write "<%RS.AddNew%>"
document.write "<%RS ("solicitante") = request.form("solicitante")%>"
document.write "<%RS.Update%>" document.write "<%response.write
end if
....asp code...

Best regards,

Carlos Removed)

Reply With Quote
Posts: n/a
Carlos Fernandes wrote on 01 mei 2004 in

> Why when i awsner N in my if statment it also inserts data in my db ?

ASP code is executed serverside BEFORE the page is sent to the client.
The client cannot execute ASP code.

> document.write "<%Set RS = Server.CreateObject ("ADODB.Recordset")%>"

The <% ... %> is executed [serverside, see above], but gives no string in

document.write ""

So it is not a very logical thing to do.

The Netherlands.
(Please change the x'es to dots in my emailaddress)
Reply With Quote

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
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
if statment (assistance) ASP .Net 2 01-09-2006 03:20 AM
PIX route inside statment John Cisco 1 09-27-2005 03:06 AM
Using "For Each ctrl In.." Statment Inside UserControl crjunk ASP .Net 2 09-03-2004 06:23 PM
Return statment JL ASP .Net 2 12-17-2003 10:47 AM