0
有人可以給我下面的MySQL查詢的等價查詢:亞音速equalent查詢
string qry = "select @rownum := @rownum + 1 AS rowno, b_eventid as EventID,b_eventdata as
EventData,b_machinetimestamp as MachineTime,b_hosttimestamp as HostTime";
qry = qry + " from bm_transaction, (select @rownum := 0) r where b_terminalid=" +
tid + " order by b_hosttimestamp desc";
MySqlDataAdapter adp = new MySqlDataAdapter(qry, sqlcon);
adp.Fill(dtLogs);
我的亞音速查詢樣本是這樣的:
DataTable dtlogs=new DataTable();
try{
arithmaticdataDB db=new arithmaticdataDB();
IDataReader drreader=db.SelectColumns("b_eventid as EventID,b_eventdata as EventData,b_machinetimestamp as MachineTime,b_hosttimestamp as HostTime")
.From(" bm_transaction").Where("b_terminalid").IsEqualTo(tid).OrderDesc("b_hosttimestamp").ExecuteReader();
我怎樣才能改變以上相當於我在SubSonic 3.0.0.4中的ADO.NET查詢? 任何指導是可觀的。
感謝在這種情況下,建議我,我感動代碼回到ADO.NET的一些原因,所以我可能不會把它作爲,但現在肯定會用一些時間過後,然後讓你知道結果 –