We help IT Professionals succeed at work.

SQL Stored procedure to insert records from form

JohnMac328
JohnMac328 asked
on
136 Views
Last Modified: 2019-01-22
I am using CF to enter data from a form.  Can the same be done with a stored procedure?

Here is the coldfusion form

<cfquery name="AddVideo" datasource="#datasource#">
                INSERT INTO VideoList
                (CategoryID, Video_Name, Length, Production_Company, Credits, Availability, NumTests)
                VALUES (<cfqueryparam cfsqltype="CF_SQL_INteger"  value="#FORM.CategoryID#">,
                        <cfqueryparam cfsqltype="CF_SQL_VARCHAR"  value="#FORM.Video_Name#">,
                        <cfqueryparam cfsqltype="CF_SQL_VARCHAR"  value="#FORM.Length#">,
                        <cfqueryparam cfsqltype="CF_SQL_VARCHAR"  value="#FORM.Production_Company#">,
                        <cfqueryparam cfsqltype="CF_SQL_INteger"  value="#FORM.Credits#">,
                        <cfqueryparam cfsqltype="CF_SQL_INteger"  value="#FORM.Availability#">,
                         <cfqueryparam cfsqltype="CF_SQL_INteger"  value="#FORM.NumTests#">)
                       
        </cfquery>
Comment
Watch Question

System Architect, CF programmer
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Great - that does make sense now.

Author

Commented:
Great job