Question : Coldfusion cfselect-bind problem

Hello experts.
I have two related selects and i somehow i don't get the right options in the child field.
I need help to check my code please.
Any help?
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
<cfset vlangid = 1>
<cfparam name="Form.Berufe_1" default="">
<cfparam name="form.getsubfirst_1" default="">
<cfparam name="form.getsubsecond_1" default="">
<cfform id="SearchForm" name="SearchForm">
<table  align="center">
            <tr>
              <td>
       <fieldset>
        <label for="Berufe_1">Main</label>
           <cfselect name="Berufe_1"
            id="Berufe_1"
            bind="cfc:test.testrelated5.com.test.q_Beruf(#vlangid#)"
            bindonload="true"
            value="Berufe_Id"
            display="Berufe_Text"
            />
         </fieldset>
              </td></tr>
              <tr><td>
       <fieldset>
        <label for="getsubfirst_1">1. Child</label>
            <cfselect name="getsubfirst_1"
            id="getsubfirst_1"
            bind="cfc:test.testrelated5.com.test.getBerufefirstsub({Berufe_1},#vlangid#)"
            bindonload="false"
            value="Subfirstprofi_id"
            display="Subfirstprofi_text"
            />
       </fieldset>
            </tr>
            </table>
 </cfform>
the cfc:
<cfcomponent>
	<cffunction name="q_Beruf" access="remote" returnType="query" output="no">
		<cfargument name="vlangid" required="no" default="3">
		<cfset var data="">
		<cfquery name="data" datasource="#request.dsn#">
         SELECT -1 AS Berufe_ID,'select' AS Berufe_Text
         FROM dbo.Berufe
         UNION
		 SELECT Berufe_ID,Berufe_Text
		 FROM dbo.Berufe
         WHERE Langid = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.vlangid#">
        </cfquery>
		<cfreturn data />
	</cffunction>
    <cffunction name="getBerufefirstsub" access="remote" returnType="query" output="no">
		<cfargument name="vlangid" required="no" default="3">
        <cfargument name="Berufe_1" type="any" required="true" default="">
		<cfset var data="">
        <cfset mylist = '4,5,6'>
		<cfif listfind(mylist,arguments.Berufe_1)>
		 <cfquery name="data" datasource="#request.dsn#">
         SELECT -1 AS Subfirstprofi_id,'select' AS Subfirstprofi_text
         FROM BerufeSubfirst)
         UNION
		 (SELECT Subfirstprofi_id,Subfirstprofi_text
		 FROM BerufeSubfirst
         WHERE MainProfi_ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.Berufe_1#">
         AND (Subfirstprofi_id = 1   or Subfirstprofi_id = 1010)
         AND LangID = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.vLangId#">
          ORDER BY Subfirstprofi_text,Subfirstprofi_id ASC
         </cfquery>
       <cfelse>
         <cfquery name="data" datasource="#request.dsn#">
         SELECT Subfirstprofi_id,Subfirstprofi_text
         FROM BerufeSubfirst
         WHERE MainProfi_ID = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.berufe_1#">
            <cfif arguments.Berufe_1 NEQ 8 AND arguments.Berufe_1 NEQ 3>
             AND LangID = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.vLangId#">
            </cfif>  
        </cfquery> 
       </cfif> 
       <cfreturn data />
	</cffunction>
</cfcomponent>

Answer : Coldfusion cfselect-bind problem

You can use PSCP for batch files - it works from command line:

http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter5.html
Random Solutions  
 
programming4us programming4us