SQL Compact select top 1

前端 未结 5 1515
不知归路
不知归路 2021-02-19 12:56

While porting an application from SQL 2005 to SQL Server Compact Edition, I found that I need to port this command:

SELECT TOP 1 Id FROM tblJob WHERE Holder_Id I         


        
5条回答
  •  清歌不尽
    2021-02-19 13:28

    I've used Fill method of SqlCEDataAdapter. You can do:

    DbDataAdapter.Fill (DataSet, Int32, Int32, String) Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. Supported by the .NET Compact Framework.

    http://msdn.microsoft.com/en-ie/library/system.data.common.dbdataadapter.fill(v=VS.80).aspx

提交回复
热议问题