public static bool TruncateTable(string dbAlias, string tableName)
{
string sqlStatement = string.Format(\"TRUNCATE TABLE {0}\", tableName);
return ExecuteNo
Use a stored procedure. Any decent db library (MS Enterprise Library is what I use) will handle escaping string parameters correctly.
Also, re:parameterized queries: I prefer to NOT have to redeploy my app to fix a db issue. Storing queries as literal strings in your source increases maintenance complexity.