A
Aleko Petkov
Hi,
This must be a common topic, but I couldn't find anything on Google. Are
there built-in functions in .NET to encode and decode strings so they can
safely be passed to SQL Server?
For example, if I want to pass something like "Mike's Place" as a query
parameter, I would need to escape the single quote so it doesn't trip up SQL
Server. Right now, I'm rolling my own functions using regular expressions,
but I have a feeling this has already been done.
Thanks,
Aleko
This must be a common topic, but I couldn't find anything on Google. Are
there built-in functions in .NET to encode and decode strings so they can
safely be passed to SQL Server?
For example, if I want to pass something like "Mike's Place" as a query
parameter, I would need to escape the single quote so it doesn't trip up SQL
Server. Right now, I'm rolling my own functions using regular expressions,
but I have a feeling this has already been done.
Thanks,
Aleko