Copy link to clipboard
Copied
Hello,this is Mr -Bat n i am getting this error when i display forms every operations work n the error disappears after subit button is pressed then it goes why it happens.ca anyone help me please. inthe code i have written this:
<cfif IsDefined(form.submit)>
<cfquery name="New" datasource="CFM">
Insert into dbo.City_Master(City_Id,City_Description,State_description)
Values(#CityCode#,'#Cityname#','#State#')
</cfquery>
<cfquery name="Update" datasource="CFM">
Update dbo.City_Master set City_Description='#Cityname#' where State_description='#State#'
</cfquery>
<cfquery name="Search" datasource="CFM">
Select * from dbo.City_Master
</cfquery>
</cfif>
Hello Mr Bat.
It's because you've used isDefined improperly. It takes a string as an argument, you're trying to pass it the *value* of form.submit, which does not exist.
Copy link to clipboard
Copied
Hello Mr Bat.
It's because you've used isDefined improperly. It takes a string as an argument, you're trying to pass it the *value* of form.submit, which does not exist.