Dato devuelto por un Proc. Almacenado
Publicado por donkirk (17 intervenciones) el 11/11/2005 17:44:36
Hola, tengo este procedimiento:
********************************************************************
ALTER PROCEDURE [dbo].[PA_DevolverLocalizaciones]
@lon float,
@lat float
AS
declare @Localizacion char(255)
declare @SearchSize as decimal(18,15)
select @SearchSize = (0.0001)
select @Localizacion = (select top 1 POBLACION from LOCALIZACIONES where LONGITUD = @lon and LATITUD = @lat)
while @Localizacion is null
begin
select @Localizacion = (select top 1 POBLACION from LOCALIZACIONES where LONGITUD between @lon-@SearchSize and @lon+@searchSize and LATITUD between @lat-@SearchSize and @lat+@SearchSize)
select @SearchSize = @SearchSize + 0.001
end
return @Localizacion
**********************************************************************
Desde el codigo, al ejecutar la linea Datareader = "Comando.ExecuteReader, me da el error: Syntax error converting the varchar value 'MADRID ' to a column of data type int"
********************************************************************
ALTER PROCEDURE [dbo].[PA_DevolverLocalizaciones]
@lon float,
@lat float
AS
declare @Localizacion char(255)
declare @SearchSize as decimal(18,15)
select @SearchSize = (0.0001)
select @Localizacion = (select top 1 POBLACION from LOCALIZACIONES where LONGITUD = @lon and LATITUD = @lat)
while @Localizacion is null
begin
select @Localizacion = (select top 1 POBLACION from LOCALIZACIONES where LONGITUD between @lon-@SearchSize and @lon+@searchSize and LATITUD between @lat-@SearchSize and @lat+@SearchSize)
select @SearchSize = @SearchSize + 0.001
end
return @Localizacion
**********************************************************************
Desde el codigo, al ejecutar la linea Datareader = "Comando.ExecuteReader, me da el error: Syntax error converting the varchar value 'MADRID ' to a column of data type int"
Valora esta pregunta
0