Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Les Matthews #1
VB.NET SP Parameter - Using a Condition Test as the False Part in an IIf
I have two asp:DropDownList items that have different label values, but the
same data values. I would like the parameter for an SP to come from the
value of the first dropdown if it has a value and from the other one if the
first has no value.
I am attempting to modify the SP's parameter value to acheive this by
embedding an IIf as the false part of its parent IIf, such as:
<Parameter Name="@companyCode" Value='<%#
IIf((Request.Form("ddCompanyCode") <> ""), Request.Form("ddCompanyCode"),
IIf(Request.Form("ddCompanyName") <> ""), Request.Form("ddCompanyName"),
Nothing) %>' Type="VarChar" Direction="Input" />
What I want this to do is use the value in ddCompanyCode if there is one;
and if not, then use the value of ddCompanyName if there is one. If neither
has a value, then pass null to the sp.
The code above produces an error reading: "Argument not specified for
parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean,
TruePart As Object, FalsePart As Object) As Object'."
Can I embed an IIf statement as the false part of a parent IIf statement?
Les Matthews Guest
-
Pulling part of test out of a field in a database?
I have a MySQL Database that has a description field, desribing the unit. At the end of that description it has a location. For instance. ... -
How to test SQL statements with parameter markers?
Hi, Does anyone know how one could benchmark SQL statements with parameter markers? e.g.: SELECT * FROM SYSCAT.TABLES WHERE TABNAME=? I can... -
#24612 [Fbk->NoF]: getimagesize('test.jpg', $info) fails (only when 2nd parameter is used)
ID: 24612 Updated by: sniper@php.net Reported By: pekka at studio-on-the dot net -Status: Feedback +Status: ... -
#24612 [Opn->Fbk]: getimagesize('test.jpg', $info) fails (only when 2nd parameter is used)
ID: 24612 Updated by: sniper@php.net -Summary: Getimagesize fails on IM 5.4.6 created jpegs Reported By: pekka... -
Store Procedure plus parameter where condition..
Hi, I am new programming in SQL Serever, and, I need to write a STORE PROCEDURE that recives a parameter to be used in the where statement,... -
darrel #2
Re: VB.NET SP Parameter - Using a Condition Test as the False Part in an IIf
> <Parameter Name="@companyCode" Value='<%#
neither> IIf((Request.Form("ddCompanyCode") <> ""), Request.Form("ddCompanyCode"),
> IIf(Request.Form("ddCompanyName") <> ""), Request.Form("ddCompanyName"),
> Nothing) %>' Type="VarChar" Direction="Input" />
>
> What I want this to do is use the value in ddCompanyCode if there is one;
> and if not, then use the value of ddCompanyName if there is one. IfCould you just check for the property BEFORE passing it into the SP call?> has a value, then pass null to the sp.
>
> The code above produces an error reading: "Argument not specified for
> parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean,
> TruePart As Object, FalsePart As Object) As Object'."
>
> Can I embed an IIf statement as the false part of a parent IIf statement?
-Darrel
darrel Guest
-
Les Matthews #3
Re: VB.NET SP Parameter - Using a Condition Test as the False Part in an IIf
"darrel" <notreal@hotmail.com> wrote in message
news:d3ed71$dm1$1@forums.macromedia.com...I think I have it working now after adding parentheses around the expression> Could you just check for the property BEFORE passing it into the SP call?
of the embedded IIf, ie.
<Parameter Name="@companyCode" Value='<%#
IIf((Request.Form("ddCompanyCode") <> ""), Request.Form("ddCompanyCode"),
IIf((Request.Form("ddCompanyName") <> ""), Request.Form("ddCompanyName"),
Nothing)) %>' Type="VarChar" Direction="Input" />
Thanks, Darrel. I may still follow your suggestion if I run into more
problems.
Les Matthews Guest



Reply With Quote

