//返回DataView對象
return ST_myDs
}
ST_GetFlowerByHits()方法返回一個SqlDataReader
public SqlDataReader ST_GetFlowerByHits()
{
string ST_strsql;
SqlDataReader ST_result;
try
{
//創建SqlConnection對象
SqlConnection ST_myCn=new SqlConnection(ST_strConn);
//創建查詢推薦前
ST_strsql=
//創建SqlCommand對象
SqlCommand ST_myCm=new SqlCommand(ST_strsql
//打開連接
ST_myCn
ST_result=ST_myCm
return ST_result;
}
catch(System
{
throw new Exception(er
}
}
ST_GetCommentTop
public DataView ST_GetCommentTop
{
string ST_strsql;
DataSet ST_myDs;
//創建查詢評論排名前
ST_strsql=
ST_myDs=ST_ExecuteSql
return ST_myDs
}
right
From:http://tw.wingwit.com/Article/program/net/201311/15754.html