所有关于随机化 [英] All about randomization

查看:76
本文介绍了所有关于随机化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算在 vb.net,VS2012 中制作入学考试窗口应用程序,我想从数据库中随机选择问题(我使用ms sql server 2005 express )而不是重复每一个问题。我对使用绑定导航器的想法有限......是否可以使用绑定导航器随机选择,或者如果没有,您是否有任何想要分享的想法,建议,教程或文章?这样做的最佳方式/解决方案是什么?



提前谢谢!

解决方案

经常(无论如何使用SQL Srver),你可以通过NEWID()对行进行排序以获得相当随机的顺序。

但是,很可能,你不希望它完全是随机的。

Im planning to make an entrance examination windows application in vb.net,VS2012, and i want to randomly select questions from database(i use ms sql server 2005 express) and not repeating every question. I have a limited idea in using binding navigator... is it possible to randomly select using binding navigator or if not do you have any ideas, suggestions,tutorials or articles that do you want to share? What s the best way/solutions to do this?

Thank you in advance!

解决方案

Often (with SQL Srver anyway), you can sort the rows by NEWID() to get a fairly random order.
But, chances are, you don't want it to be completely random.


这篇关于所有关于随机化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆