I have Table
named tbl_search
with columns : id(int), title(nvarchar100), result(ntext)
and i want using SQL query
, like
I did the following:
After doing the above, the error was gone.
Please check the connection string in the web.config
(Check if you are connected to correct domain).
In my case - my database connection string in web.config
was referring to QA and I was modifying in Dev database.
Your SQL Statement only returns the title not the full entity.
Change:
Select top 1 title From tbl_search Where title=@title and id=@id
to:
Select top 1 * From tbl_search Where title=@title and id=@id
I solved this issue because I had a '@StartDate' in my last select and asp.net could not read it and returned it as 'Column1', so I have solved this by assigning @StartDate to a variable which is good practice anyway.