<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1017039" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1017039</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/asp-rnd#comment-1099369</link>
    <description> &lt;p&gt;I was going to suggest using two arrays. Good idea!&lt;/p&gt;
&lt;p&gt;Detox, thanks for going the extra mile, great work!&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 17:28:11 +0000</pubDate>
 <dc:creator>Peter J. Boettcher</dc:creator>
 <guid isPermaLink="false">comment 1099369 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/asp-rnd#comment-1099358</link>
    <description> &lt;p&gt;Thank you very much for the responses.  I have also been working on another way of making this happen because I was not good enough at coding to do what you were able to do detox.  My way is working, let me explain what I did.&lt;/p&gt;
&lt;p&gt;I have an array being built from the DB using GetRows.  Once the data is dumped to the array I run a random script which will select one record from the array.  That number is then saved to a new array and then moved to the last record in the array...&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;Sub RemoveQuestion(intRecID)&lt;br /&gt;QuestionArray(1,intRecID) = QuestionArray(UBound(QuestionArray,2))&lt;br /&gt;Redim Preserve QuestionArray(UBound(QuestionArray,2) - 1)&lt;br /&gt;End Sub&lt;/code&gt;&lt;/div&gt;&#039;&lt;br /&gt;
I then have the same array with 1 less record which is the one I just chose.  While looping through that it removes each record requested.&lt;/p&gt;
&lt;p&gt;The reason I sent it to another array is so I can pass that through the querystring or anywhere to reference the order later.&lt;/p&gt;
&lt;p&gt;Does this make sense to do it this way?  Any suggestions?&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 15:04:01 +0000</pubDate>
 <dc:creator>artsapimp</dc:creator>
 <guid isPermaLink="false">comment 1099358 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/asp-rnd#comment-1099357</link>
    <description> &lt;p&gt;OK,&lt;/p&gt;
&lt;p&gt;here we go. My hosts server was down for a bit. You can download it all here &lt;a href=&quot;http://detoxdezigns.com/TWF/quiz.zip&quot; class=&quot;bb-url&quot;&gt;http://detoxdezigns.com/TWF/quiz.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The db and asp page are all there in a zip file. The code is commented quite heavily but if you have any problems give me a pm and well work through them. The way the questions and answers are displayed can be changed really easily.&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 14:38:05 +0000</pubDate>
 <dc:creator>detox</dc:creator>
 <guid isPermaLink="false">comment 1099357 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/asp-rnd#comment-1099321</link>
    <description> &lt;p&gt;wow... quick&lt;/p&gt;
&lt;p&gt;If you want random numbers that don&#039;t repeat, use a loop and an array.  In the loop, grab a random number and check to see if it&#039;s in the array.  If so, loop and try again.  Once you&#039;ve got a number that is not in the array, exit the loop.  Add the number to the array, and use it where ever you needed it for (DB query, etc.).&lt;/p&gt;
&lt;p&gt;Did that make any sense? &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/confused.png&quot; title=&quot;Confused&quot; alt=&quot;Confused&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 06:20:34 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1099321 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/asp-rnd#comment-1099315</link>
    <description> &lt;p&gt;I have it done.&lt;/p&gt;
&lt;p&gt;I have a db with 40 questions in it, and the corresponding answers. I have built a quiz with 10 questions, and put it in the form of a multiple choice quiz, if you want to change it you can. I&#039;ll zip it up (db and all) and put it on my site for you...&lt;/p&gt;
&lt;p&gt;will get back to you with a link soon.&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 05:51:40 +0000</pubDate>
 <dc:creator>detox</dc:creator>
 <guid isPermaLink="false">comment 1099315 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/asp-rnd#comment-1099302</link>
    <description> &lt;p&gt;simply tag the questions that you get from the random function so that if the question is picked again it will be disregarded.&lt;/p&gt;
&lt;p&gt;I&#039;ll have a go at something for you.....&lt;/p&gt;
 </description>
     <pubDate>Thu, 24 Jan 2002 02:12:18 +0000</pubDate>
 <dc:creator>detox</dc:creator>
 <guid isPermaLink="false">comment 1099302 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
