Yea, no, it wasn't the solution, though I did figure out what was going on
.. too bad neither the context highlighting in CF Studio nor the coldfusion
parser cought it the way they should have. Either one would have saved me
several hours...

> It's kinda funny that way huh?  We've found the same thing.

> But the documentation cites:
> dbVarName
>  Required for named notation. The parameter name corresponding to the name
> of the parameter in the stored procedure

> Wonder how one forces named notation then...

> Still...  I guess my solution didn't help huh...

> -----Original Message-----
> From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 30, 2002 11:13 AM
> To: CF-Talk
> Subject: RE: more cfstoredproc issues ...


> Actually the names in the dbvarname attribute are completely ignored by
> the
> cf-server as far as I or anyone else has been able to determine. They have
> to be in the same order as they are declared in the database for this
> reason. I don't know off the top of my head if dbvarname is a required
> attribute ( I would want it to be personally ) for the cfprocparam tag,
> but
> I include them regardless for code legibility, just like I include the
> names
> when calling nested stored procedures. It helps reduce the risk of the
> order
> or parameters changing causing a problem, etc. Or at least it does within
> the db -- ColdFusion is another story.

>> I know...  I saw there was another response in this thread that
>> suggested that you should use AS in your var declarations...  Just
>> adding to that...

>> Funny thing I've noticed though that if you don't get the
>> var name right in
>> cfprocparam, it just goes by the order of the variables.

>> You could use dbvarname="foo" for all it matters...  If
>> you get the var
>> names wrong, it just uses the variable order...

>> Sort of like calling a stored procedure this way:

>> Exec sproc_test 1,2,3,4
>> Vs
>> Exec sprc_test @var1=1, @var2=2, @var3=3, @var4=4

>> AFAIK, using the wrong var name just switches to the first version...

>> -----Original Message-----
>> From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]]
>> Sent: Monday, September 30, 2002 9:36 AM
>> To: CF-Talk
>> Subject: RE: more cfstoredproc issues ...


>>> Dude...  In your cfprocparam tag, you write this: <cfprocparam
>>> type="in" dbvarname="LibraryID"
>>>
>>> You should write:
>>> <cfprocparam type="in" dbvarname="@LibraryID"
>>>
>>> AFAIK, you need the "@" symobol.

>> hmmm... I'll try it, but I've got dozens if not hundreds
>> of stored procedure
>> calls in this app, and none of them use the @ in the dbvarname
>> attribute, and all of them are working (afaik) accept this one.

>>> Also, the word AS is unnecessary...  You
>>> don't need it for any variable declaration in a stored
>>> proc.

>> Not using it to declare parameters in the procedure definition ...

>>> -----Original Message-----
>>> From: S.Isaac Dealey [mailto:[EMAIL PROTECTED]]
>>> Sent: Sunday, September 29, 2002 6:34 PM
>>> To: CF-Talk
>>> Subject: more cfstoredproc issues ...


>>> Argh!

>>> I have a stored procedure with parameters as:

>>> CREATE   PROCEDURE tap_adLibUpdate
>>>     @LibraryID int,
>>>     @Ident int,
>>>     @UpdatedDate datetime,
>>>     @PageFileName varchar(15) = NULL,
>>>     @ArchivePath varchar(15) = NULL,
>>>     @Scheduled bit = 0,
>>>     @RestoreID int = NULL,
>>>     @UpdateError varchar(8000) = NULL
>>> AS

>>> and I'm using this code in CF:

>>> <cfstoredproc procedure="tap_adLibUpdate"
>>> datasource="#request.tap.dsn#" username="#request.tap.dsnusr#"
>> password="#request.tap.dsnpwd#">
>>>     <cfprocparam type="in" dbvarname="LibraryID"
>>> value="#variables.PageID#" cfsqltype="cf_sql_integer">
>>>     <cfprocparam type="in" dbvarname="Ident"
>>>     value="#Request.User.ID#"
>>> cfsqltype="cf_sql_integer">
>>>     <cfprocparam type="in" dbvarname="UpdatedDate"
>>> value="#CreateODBCDate(Now())#" cfsqltype="cf_sql_timestamp">
>>>     <!--- indicates the file name for a top level container
>>>     -- file
>>> extension may change although file name is consistent
>>> --->
>>>     <cfprocparam type="In" dbvarname="PageFileName"
>>> value="#variables.tempfilename#" cfsqltype="cf_sql_varchar"
>>> null="#yesnoformat(not rspage.istoplevelcontainer)#">
>>>     <!--- archive path indicates where restoring content is
>>>     being
>>> restored from
>>> -->
>>>     <cfprocparam type="in" dbvarname="ArchivePath"
>>> value="#variables.archivepath#" cfsqltype="cf_sql_varchar"
>>> null="#yesnoformat(not request.tap.archivecontent)#">
>>>     <cfprocparam type="In" dbvarname="Scheduled" value="0"
>>> cfsqltype="cf_sql_bit">
>>>     <cfprocparam type="in" dbvarname="restoreid"
>>> value="#variables.restoreid#" cfsqltype="cf_sql_integer"
>>> null="#yesnoformat(IsDate(attributes.RestoreFromDate))#">
>>>     <cfprocparam type="In" dbvarname="UpdateError"

>>> value="#variables.errormessage#"
>>> cfsqltype="cf_sql_varchar">
>>>     <cfprocresult name="rsupdate" resultset="1"> </cfstoredproc>

>>> and I'm getting this error:

>>> [Microsoft][ODBC SQL Server Driver][SQL Server]Procedure
>>> 'tap_adLibUpdate' expects parameter '@LibraryID', which was not
>>> supplied.

>>> I know that the LibraryID parameter is defined in the <cfprocparam>
>>> tags. I know that none of it was misspelled. I know that
>>> the value of
>>> variables.PageID is an integer. What I don't know is why
>>> I'm getting an
>>> error message that tells me exactly what the problem is
>>> not.

>>> Anybody have any ideas?

>>> Isaac Dealey
>>> Certified Advanced ColdFusion 5 Developer

>>> new epoch
>>> www.turnkey.to
>>> 954-776-0046


>>>

>> __________________________________________________________
>> ____________
>> Structure your ColdFusion code with Fusebox. Get the
>> official book at http://www.fusionauthority.com/bkinfo.cfm
>> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
>> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>> Unsubscribe:
>> http://www.houseoffusion.com/index.cfm?sidebar=lists


> Isaac
> Certified Advanced ColdFusion 5 Developer

> www.turnkey.to
> 954-776-0046


> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to