a database question

Results 1 to 2 of 2

Thread: a database question

  1. #1
    Join Date
    Dec 1969

    Default a database question

    I would like to know how i can replace the array for the onselect options with data i have from my database...<BR><BR>Instead of this:<BR>var dogs = new Array("poodle","puli","greyhound");<BR>var fish = new Array("trout", "mackerel", "bass");<BR>var birds = new Array("robin", "hummingbird", "crow");<BR><BR>can i replace the array with database??

  2. #2
    Join Date
    Dec 1969

    Default RE: a database question

    var dogs = new Array();<BR>var fish = new Array("");<BR>var birds = new Array("");<BR>var i, j, l;<BR><BR>i=0;<BR>j=0;<BR>l=0;<BR><BR>OPn db connection, open recordset<BR><BR>while (!rst.eof) {<BR>if (rst("AnimalType") == "dog"){<BR>dog(i) = rst("breed");<BR>i++;<BR>}<BR>if (rst("AnimalType") == "fish"){<BR>fish(j) = rst("breed");<BR>j++;<BR>}<BR>if (rst("AnimalType") == "bird"){<BR>bird(l) = rst("breed");<BR>l++;<BR>}<BR>rst.movenext;<BR>}<B R><BR>HTH<BR>Dave

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts