asp.net随机读取access数据库

时间:2009-04-16    点击:2540   

 

        Random rnd = new Random(unchecked((int)DateTime.Now.Ticks));


        int intRandomNumber = rnd.Next();

        string sql = "select top 10 * from [user] Order By  Rnd(" + (-1 * intRandomNumber) + "*userid)";

        userid是表的自动编号

vb.net

    Dim TimeString As String = DateTime.Now.Ticks.ToString()
    Dim a As UInt32 = UInt32.Parse(TimeString.Substring(TimeString.Length - 8, 8))
    Dim b As Int32 = BitConverter.ToInt32(BitConverter.GetBytes(a), 0)
    Dim rnd As Random = New Random(b)
    Dim intRandomNumber As Integer = rnd.Next

弹出层传值
GridView加载空行并点击编辑
ASP.NET2.0导出到Excel并换行
GridView导出Excel文件如何隐藏指定的列
HyperLink控件控制图片宽度高度的方法
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 All Rights Reserved