Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<!--- FormPage.cfm --->
<cfquery name="Recordset_to_Populate_Form" datasource="Northwind">
SELECT dbo.Customers.CustomerID CustomerID,
dbo.Customers.CompanyName CompanyName
FROM dbo.Customers
WHERE CustomerID = 'ALFKI'
</cfquery>
<cfoutput>
<FORM action="Action_Page_to_Populate_Form_Fields_Using_Stored_Proc.cfm" method="post" name="FORM" id="FORM"></cfoutput>
<cfoutput query="Recordset_to_Populate_Form">
<input type="hidden" value="#Recordset_to_Populate_Form.CustomerID#" name="CustomerID">
<input name="CompanyName" value="#Recordset_to_Populate_Form.CompanyName#" type="text">
<input name="Submit" value="Submit" type="submit">
</form>
</cfoutput>
<!--- Action_Page_to_Populate_Form_Fields_Using_Stored_Proc.cfm --->
<CFSTOREDPROC procedure="dbo.Update_Northwind_Customers_Table5"
datasource="Northwind">
<CFPROCPARAM type="IN" cfsqltype="CF_SQL_VARCHAR" value="Form.CustomerID">
<CFPROCPARAM type="IN" cfsqltype="CF_SQL_VARCHAR" value="Form.CompanyName">
</CFSTOREDPROC>
<cfinclude template="FormPage.cfm">
<CFSTOREDPROC procedure="dbo.Update_Northwind_Customers_Table5"
datasource="Northwind"
[COLOR=red]username="#username#"
password="#password#"[/color]>
<CFPROCPARAM type="IN" cfsqltype="CF_SQL_VARCHAR" value="Form.CustomerID">
<CFPROCPARAM type="IN" cfsqltype="CF_SQL_VARCHAR" value="Form.CompanyName">
</CFSTOREDPROC>
<!--- FormPage.cfm --->
<cfquery name="Recordset_to_Populate_Form" datasource="Northwind"
username="#username#"
password="#password#">
[COLOR=red]exec Recordset_to_Populate_Form[/color]
</cfquery>
<cfoutput>
<FORM action="Action_Page_to_Populate_Form_Fields_Using_Stored_Proc.cfm" method="post" name="FORM" id="FORM"></cfoutput>
<cfoutput query="Recordset_to_Populate_Form">
<input type="hidden" value="#Recordset_to_Populate_Form.CustomerID#" name="CustomerID">
<input name="CompanyName" value="#Recordset_to_Populate_Form.CompanyName#" type="text">
<input name="Submit" value="Submit" type="submit">
</form>
</cfoutput>
if exists (select * from dbo.sysobjects where id = object_id(N'Recordset_to_Populate_Form) and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure Recordset_to_Populate_Form
go
create procedure Recordset_to_Populate_Form
AS
SELECT dbo.Customers.CustomerID CustomerID,
dbo.Customers.CompanyName CompanyName
FROM dbo.Customers
WHERE CustomerID = 'ALFKI'
<FORM action="Action_Page_to_Populate_Form_Fields_Using_Stored_Proc.cfm" method="post" name="FORM" id="FORM"></cfoutput>