[thelist] coldfusion and stored procedures

sarah disaster7 at yahoo.com
Wed May 30 10:15:36 CDT 2001


The code I'm using is at the end of this message.
Anyhow, the problem is. I have a form being filled out
and I need to insert the values with a stored
procedure. I haven't done this before and I'm having
some issues. First of all "ins_system" is a function
and returns a value. I don't need the value that is
returned, so I'm not doing anything with that. Should
I have to anyhow?

Basically for each cfprocparam I did this. All
types="In" the cfsqltypes correspond to the database,
the dbvarname is the name of the field in the table,
value is the form value to be inserted, and null="No"
in all cases because no null values are inserted.

Am I handling this correctly?

TIA,
Sarah


<cfstoredproc procedure="ins_system"
datasource="#application.dsn#">
<cfprocparam type="In" cfsqltype="CF_SQL_INTEGER"
dbvarname="colo_site_network_id"
value="#form.colo_site_network_id#" null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="machine_name" value="#form.machine_name#"
null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="machine_domain_name"
value="#form.machine_domain_name#" null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="ip_address" value="#form.ip_address#"
null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="hardware" value="#form.hardware#"
null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="os" value="#form.os#" null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="memory_configuration"
value="#form.memory_configuration#" null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="system_state" value="#form.system_state#"
null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="status" value="#form.status#" null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="asset_id" value="#form.asset_id#"
null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR"
dbvarname="serial_number" value="#form.serial_number#"
null="No">
<cfprocparam type="In" cfsqltype="CF_SQL_INTEGER"
dbvarname="company_id" value="#form.company_id#"
null="No">
</cfstoredproc>

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/




More information about the thelist mailing list