My inline sql query is like this
DataSet ds = SqlHelper.ExecuteDataset(GlobalSettings.DbDSN, CommandType.Text,
"SELECT TOP 1000 [ID],[Project],[Owner],[Consultant],[Contractor],[Value],
[Level1], [Level2] ,[Status] ,[Category] ,[Country],[CreatedDate],
[CreatedByID], [CreatedByName]
FROM [DBname].[dbo].[tbl_Projects]
where [Category] like %@Category%
and Value=1000
and Country like'%Bahrain%'
order by CreatedDate",
new SqlParameter("@Category","oil") );
everything looks okay to me .But it throws an error
System.Data.SqlClient.SqlException: Incorrect syntax near 'Category'.
I believe it is something I had done wrong when using like query. Can any one point out what went wrong?