以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.net/bbs/index.asp)
--  专家坐堂  (http://foxtable.net/bbs/list.asp?boardid=2)
----  动态计算排序  (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=190334)

--  作者:lxhmax
--  发布时间:2024/2/1 12:25:00
--  动态计算排序
cmd.CommandText = "Sel ect * From (Sele ct Row_Number() Over(Order by GetDistance(jo.latitude, jo.longitude, 门店表.纬度, 门店表.经度)) As RowNum, * from 门店表 Where " & Filter & ") As a Where RowNum > " & ks & " And RowNum <= " & js


\'GetDistance\' 不是可以识别的 内置函数名称。 在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) 在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) 在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) 在 System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) 在 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) 在 System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) 在 System.Data.OleDb.OleDbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) 在 Foxtable.SQLCommand.ExecuteReader(Boolean Save)


GetDistance(jo.latitude, jo.longitude, 门店表.纬度, 门店表.经度)
对于这种动态计算的使用内部函数直接写报错,正确的方式应该是怎样

--  作者:有点蓝
--  发布时间:2024/2/1 13:30:00
--  
GetDistance在哪里定义的?