7 Oct
2004
7 Oct
'04
6:33 p.m.
Laura McCord I am trying to do an insert but I do not want the insert to occur if the value of "ipAddress" was not entered in the form.
So far I have this:
insert into NetInt(IPAddress, SystemNetName) Values( '<dtml-var name="ipAddress" sql_quote>', '<dtml-var name="HostName" sql_quote>' )
I am thinking that I have to put a conditional statement such as <dtml-if ipAddress> insert into NetInt(IPAddress, SystemNetName) Values( '<dtml-var name="ipAddress" sql_quote>', '<dtml-var name="HostName" sql_quote>' ) </dtml-if>
I would do the test before ever calling the insert method at all. Let the insert do the one thing it is supposed to do, and let the program control handle the flow of control. Cheers, Tom P