I have a variable string session_start_time
which gets result from database and is - 2017-07-15 03:54:37.000
But the following query results in an error:
select *
from surf_ads_views
where date_time >= " + session_start_time + "
and member_id = " + member_id
The error is below:
An exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll but was not handled in user code
Additional information: Incorrect syntax near '3'.
I am not able to figure out, why its causing an error