Well if the code you posted is the exact code you used then your problem is that you are missing the '@' sign before OutPutFileName in the sp_trace_create call here's your code:
exec @rc = sp_trace_create @TraceID output, 0, OutputFileName, @maxfilesize, @EndTime
And here's what it should be:
exec @rc = sp_trace_create @TraceID output, 0, @OutputFileName, @maxfilesize, @EndTime
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question