title: A file activation error occurred. The physical file name 'N@filename
body: <p>Below t-sql code compiles fine. But when I run it like
  exec [SP_ATTACH_NW] N'C:\myfolder' I get</p>
  
  <p>Msg 5105, Level 16, State 2, Procedure SP_ATTACH_NW, Line 14
  A file activation error occurred. The physical file name 'N@mdfFileName' may be incorrect. Diagnose and correct additional errors, and retry the operation.</p>
  
  <pre><code>USE master
  
  GO
  
  SET ANSI_NULLS ON
  
  GO
  
  CREATE PROCEDURE [dbo].[SP_ATTACH_NW] (
      @DestFolder varchar(255)
  )
  
  AS
  
  BEGIN
  
      SET NOCOUNT ON;
  
      Declare @mdfFileName varchar(255)
      Declare @ldfFileName varchar(255)
  
      set @mdfFileName = @DestFolder + '\northwnd.mdf'
      set @ldfFileName = @DestFolder + '\northwnd.ldf'
  
  CREATE DATABASE [Northwind] ON 
  
  ( FILENAME = N@mdfFileName ),
  
  ( FILENAME = N@ldfFileName )
  
   FOR ATTACH
  
  
  END
  </code></pre>
  
  <p>Pls advise. thanks</p>