You should always use compiled queries / known also as prepared statements. They will simply do the job of validating the values for you, adding a layer of security to your application.
Please note that this still doesn't ensure at 100% that your code won't be vulnerable to SQL injection attacks, but it's already a good basis for security as SQL injection becomes much more complicated to be exploited with prepared statements. You can read more here about these advanced attacks.
So, in the end, keep in mind that as long as you're dealing directly with strings you won't be safe at all and you will have to check manually the validity of the parameter.
And you simply can't do this without built-in objects/functions because you have too many characters to deal with (Unicode, etc...).
For instance this article will explain you why it's not enough to naively escape only the quotes.
So you just can't deal with the problem without sanitizing the string before the use.
NOTE: Classic ASP solution
In classic ASP what I introduced above is called Type-Safe SQL Parameters.
The Parameters collection in SQL Server provides type checking and length validation. If you want to use type-safe SQL parameter you can read more about them here.