开发者

.NET build error

Having added the subsonic 2.2 subcommander sonic.exe as an external tool I can generate my DAL classes in my defined \dataaccess\generated\ folder but when I build the project I get an error in the following file:

C:\开发者_Python百科WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\subsonictest\bdf9ac02\aff68c1c\App_Code.2ygn7ole.0.cs in the following:

Code:

/// <summary>
/// Creates an object wrapper for the iData_sp_GenerateDataSQL Procedure
/// </summary>
public static StoredProcedure IDataSpGenerateDataSQL(string TABLE, string IDENTITYCOL)
{
  SubSonic.StoredProcedure sp = new 
      SubSonic.StoredProcedure("iData_sp_GenerateDataSQL", 
                               DataService.GetInstance("KLA"), 
                               "PUZZLE\mnolan");        
  sp.Command.AddParameter("@TABLE", TABLE, DbType.AnsiString, null, null);       
  sp.Command.AddParameter("@IDENTITYCOL", IDENTITYCOL, DbType.AnsiString, null, null);
  return sp;
}

The error message is - error CS1009 Unrecognized escape sequence and shows the error is associated with the PUZZLE\mnolan string. I can escape the sequence with '\' but this won't help because this is a temporary build file and is regenerated.

Thanks for the help,

Mike


Try :

@"PUZZLE\mnolan"

Backslashes are special characters in C# strings. The @ tells C# to treat them literally. You could double the backslash instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜