Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FillArray problems

Status
Not open for further replies.

rotschreck

Programmer
Jan 26, 2000
54
0
0
CA
www.geocities.com
Hey there.<br><br>I am working on trying to get some combo boxes to select a selection list in another selction list. So far the code seems to be ok except that it doesn't work. ... so obviously I missed something.<br><br>As far as I can see, it has something to do with the FillArray command on line 39, as after that line, nothing prints to the screen.<br><br>Here's the code and thanks in advance for any help you can offer:<br><br>____________________________________________________________<br>&lt;%@ Language=VBScript %&gt;<br>&lt;% Option Explicit %&gt;<br><br>&lt;!-- #include file=adovbs.inc --&gt;<br>&lt;!-- #include file=DynamicSelect.inc --&gt;<br><br>&lt;%<br>DIM Conn, rsPrimary, rsSecondary, intFirstPub, DB_CONNECTIONSTRING, objRecordset <br><br>&nbsp;' Put your connection information here.<br>&nbsp;'Set Conn = Server.CreateObject(&quot;ADODB.Connection&quot;)<br><br>DB_CONNECTIONSTRING = &quot;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=&quot; & Server.Mappath(&quot;mndm.mdb&quot;) & &quot;;&quot;<br>Conn = &quot;DRIVER={Microsoft Access Driver (*.mdb)};DBQ=&quot; & Server.Mappath(&quot;mndm.mdb&quot;) & &quot;;&quot;<br><br>&nbsp;SET rsPrimary = Server.CreateObject(&quot;ADODB.RecordSet&quot;)<br>&nbsp;SET rsSecondary = Server.CreateObject(&quot;ADODB.RecordSet&quot;)<br>&nbsp;Set objRecordset = Server.CreateObject(&quot;ADODB.Recordset&quot;)<br>%&gt;<br><br>&lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;TITLE&gt;Help<br>&lt;/TITLE&gt;&lt;/HEAD&gt;<br><br>&lt;BODY&gt;<br><br>&lt;%<br>objRecordset.Open &quot;withdrawalsReopenings&quot;, DB_CONNECTIONSTRING, adOpenStatic, adLockPessimistic, adCmdTable<br>rsPrimary.Open &quot;SELECT primid, primpurp FROM purpose1 ORDER BY primpurp&quot;, Conn<br><br>IF NOT (rsPrimary.BOF AND rsPrimary.EOF) THEN<br>&nbsp;&nbsp;&nbsp;intFirstPub = rsPrimary(&quot;primid&quot;)<br>ELSE<br>&nbsp;&nbsp;&nbsp;intFirstPub = 0<br>END IF<br>rsSecondary.Open &quot;SELECT primid, secid, secpurp FROM purpose2 ORDER BY primid, secpurp&quot;, Conn <br><br>FillArray &quot;arrpurpose2&quot;, rsSecondary, &quot;primid&quot;, &quot;secid&quot;, &quot;secpurp&quot;<br>%&gt;<br><br>&lt;CENTER&gt;<br>&lt;H2&gt;Dynamic Select List&lt;/H2&gt;<br>&lt;FORM&gt;<br>&lt;TABLE WIDTH=100%&gt;<br>&lt;TR&gt;<br>&nbsp;&lt;TD&gt;Primary List:&lt;br&gt;<br>&lt;%SelectBox rsPrimary, &quot;lstpurpose1&quot;, &quot;primid&quot;, &quot;primpurp&quot;, &quot;lstpurpose2&quot;, &quot;arrpurpose2&quot; %&gt;<br>&nbsp;&lt;/TD&gt;<br>&nbsp;&lt;TD&gt;Secondary List:&lt;br&gt;<br>&lt;%<br>&nbsp;&nbsp;&nbsp;rsSecondary.Filter = &quot;primid = '&quot; & intFirstPub & &quot;'&quot;<br>&nbsp;&nbsp;&nbsp;SelectBox rsSecondary, &quot;lstpurpose2&quot;, &quot;secid&quot;, &quot;secpurp&quot;, &quot;&quot;, &quot; &quot; <br>&nbsp;&nbsp;&nbsp;rsSecondary.Filter = adFilterNone<br>%&gt;<br>&nbsp;&lt;/TD&gt;<br>&lt;/TR&gt;<br>&lt;/TABLE&gt;<br>&lt;/FORM&gt;<br>&lt;/CENTER&gt;<br>&lt;/BODY&gt;<br>&lt;/HTML&gt; <p> <br><a href=mailto: > </a><br><a href= Eclectic Page</a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top