1
   

ASP udating and adding records in tables.

 
 
gbob
 
Reply Wed 3 Oct, 2007 08:39 am
Hi everyone !

Please can you help me. I have this can i put an if statement within an if statement ? how would I write if field ("ean") is not equall to none in table (packinglist) then do an update query?

IF Request("Submit") = 1 Then


Set RSE = Server.CreateObject("ADODB.Recordset")
RSE.Locktype = adlockOptimistic
RSE.Open "Select * FROM Packing_List WHERE 1<>1", Con
RSE.AddNew
RSE("ean") = ("ean")
RSE.Update
RSE.Close
Set RSE = nothing
Response.Redirect ("packinglist.asp?Cmp=1")
End IF
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 809 • Replies: 1
No top replies

 
hingehead
 
  1  
Reply Tue 9 Oct, 2007 07:21 pm
Hi Bob

How about

If RSE("ean") > 0 Then....

But you might want to test it - do you really have '0' in that field or is it empty/null?

If so lookup IsEmpty and IsNull on any decent asp site (or search for both on google with ASP).

happy trails.
0 Replies
 
 

Related Topics

Webdevelopment and hosting - Question by harisit2005
Showing an Ico File - Discussion by Brandon9000
how to earn money in internet - Discussion by rizwanaraj
The version 10 bug. Worse then Y2K! - Discussion by Nick Ashley
CSS Border style colors - Question by meesa
There is no Wisdom in Crowds - Discussion by ebrown p
THANK YOU CRAVEN AND NICK!!! - Discussion by dagmaraka
I'm the developer - Discussion by Nick Ashley
 
  1. Forums
  2. » ASP udating and adding records in tables.
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/01/2024 at 10:01:22