markknowsley
Programmer
I have a SQL statement that I want to add a parameter to half way through.
i.e.
select name
from table
where name = + parameter name
---------------------------------
order by name
so I want to start reading the sql into a string, then stop reading and add a value from my form, and then carry on reading the sql again.
My C# would look like
StreamReader sr = new StreamReader();
string sqlSelect = sr.ReadBlock(some values) + parameter + sr.ReadBlock(some values);
Please can someone tell me how to get the StreamReader.ReadBlock to stop at a certain point in my SQL file, and then continue to read from that point?
Maybe there's a better way of doing this...
i.e.
select name
from table
where name = + parameter name
---------------------------------
order by name
so I want to start reading the sql into a string, then stop reading and add a value from my form, and then carry on reading the sql again.
My C# would look like
StreamReader sr = new StreamReader();
string sqlSelect = sr.ReadBlock(some values) + parameter + sr.ReadBlock(some values);
Please can someone tell me how to get the StreamReader.ReadBlock to stop at a certain point in my SQL file, and then continue to read from that point?
Maybe there's a better way of doing this...