c# - Error not thrown while executing query -
we executed below sql command using system.data.sqlclient.sqlcommand , assigned sqldata reader.
select distinct cast([reg].[pin] float) [pin] [reg] here datatype of column 'pin' nvarchar , contains string data also. while executing query no error thrown , reader hasrows property returned false, when reader.read done error thrown.
normally if query contains error while executing error thrown, above query why behaving differently?
because sql thinks fine @ first instance. when reads data , tried parse read during reader.read error thrown.
Comments
Post a Comment