select top 20 Hd_CountyID_FK, Hd_LocalID_FK, Hd_Address, Hd_ShowAddress, Hd_AdvAddress,Hd_Longitude, Hd_Latitude, Hd_ImageStr,Hd_Price_Real,Hd_Price_Show,Hd_ImagePath,Hd_HouseArea,Hd_HouseArea_Show, Hd_Price_Unit, Hd_ObjID, Hd_UpdateTime, a.Ct_CountyName as CountyName, b.Lo_LocalName as Lo_LocalName from SF_HouseData left join SF_Address_County as a on a.Ct_CountyId = Hd_CountyID_FK left join SF_Address_Local as b on b.Lo_LocalId=Hd_LocalID_FK where Hd_ObjID is not null and Hd_ObjID not in (select TOP 0 Hd_ObjID from SF_HouseData where Hd_ObjID is not null and Hd_TradeType = 1 and hd_pay=1 and hd_display=1 and Hd_CountyID_FK=1 and dbo.fnGetDistance(121.593257399505540,25.050394514545300,Hd_Longitude, Hd_Latitude) <=2 order by Hd_updatetime desc) and Hd_TradeType = 1 and hd_pay=1 and hd_display=1 and Hd_CountyID_FK=1 and dbo.fnGetDistance(121.593257399505540,25.050394514545300,Hd_Longitude, Hd_Latitude) <=2 order by Hd_updatetime desc
System.Data.SqlClient.SqlException: Error converting data type varchar to real.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.HasMoreRows()
at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
at System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping)
at System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue)
at System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at Database.GetDataSet(String cmdText, CommandType cmdType)
at Database.GetDataTable(String cmdText, CommandType cmdType)
at SearchShowObject.GetData(Int32 iCurrentPage)