摘要:
一.用SqlConnection连接SQLServer1.加入命名空间usingSystem.Data.SqlClient;2.连接数据库SqlConnectionmyConnection=newSqlConnection();myConnection.ConnectionString="userid=sa;password=sinofindb;initialcatalog=test;dataso... 阅读全文
posted @ 2009-06-11 15:57
洞幺人生
阅读(352)
评论(0)
推荐(0)
摘要:
Access:select top n * from table order by rnd(id)'id为数据库的自动编号字段Sql Server:select top n * from table order by newid() 阅读全文
posted @ 2009-06-11 14:56
洞幺人生
阅读(197)
评论(0)
推荐(0)
摘要:
1.SqlConnectionthisConnection=newSqlConnection();thisConnection.Open(StrConn);SqlCommandthisCommand=thisConnection.CreateCommand();//命令类型为存储过程thisCommand.CommandType=CommandType.StoredProcedure;//存储过程... 阅读全文
posted @ 2009-06-11 14:48
洞幺人生
阅读(282)
评论(0)
推荐(0)
浙公网安备 33010602011771号