SqlException i don't know what to do with

D

Dan Holmes

I don't know how to troubleshoot this one. src is after the error.

"System.Data.SqlClient.SqlException: XML parsing: line 1, character 698,
illegal qualified name character\r\n at
System.Data.SqlClient.SqlConnection.OnError(SqlException exception,
Boolean breakConnection)\r\n at
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)\r\n at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj)\r\n at System.Data.SqlClient.TdsParser.Run(RunBehavior
runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream,
BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
stateObj)\r\n at
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)\r\n at
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean
async)\r\n at
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior
cmdBehavior, RunBehavior runBehavior, Boolean returnStream,
String method, DbAsyncResult result)\r\n at
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe)\r\n at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery()\r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Database.DoExecuteNonQuery(DbCommand
command)\r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Database.ExecuteNonQuery(DbCommand
command)\r\n at
IVS.Framework.Logging.ErrorService.InsertError(Identity id, ErrorInfo
ed) in
C:\\SandBox\\IAF.NET\\IAF\\trunk\\src\\BOs\\Error\\Server\\ServerError.cs:line
256"

cmd = db.GetStoredProcCommand("InsertError");
db.AddInParameter(cmd, "userid", System.Data.DbType.String, ed.UserID);
db.AddInParameter(cmd, "CurrentDate", System.Data.DbType.DateTime,
ed.CreateDate);
db.AddInParameter(cmd, "IVSError", System.Data.DbType.String,
ed.IAFError ? "Y" : "N");
db.AddInParameter(cmd, "PrimaryComponentID", System.Data.DbType.String,
ed.PrimaryComponentID);
db.AddInParameter(cmd, "PrimaryFunctionID", System.Data.DbType.String,
ed.PrimaryMethodName);
db.AddInParameter(cmd, "PrimaryAssemblyName", System.Data.DbType.String,
ed.PrimaryAssemblyName);
db.AddInParameter(cmd, "PCID", System.Data.DbType.String, ed.PCID);
db.AddInParameter(cmd, "DeviceID", System.Data.DbType.String, ed.DeviceID);
db.AddInParameter(cmd, "ExceptionType", System.Data.DbType.String,
ed.ExceptionType);
db.AddInParameter(cmd, "StackTrace", System.Data.DbType.String,
ed.StackTrace);
db.AddInParameter(cmd, "Message", System.Data.DbType.String, ed.Message);
db.AddInParameter(cmd, "Data", System.Data.DbType.Xml, ed.Data);
db.AddParameter(cmd, "RetVal", System.Data.DbType.Int32,
System.Data.ParameterDirection.ReturnValue, "",
System.Data.DataRowVersion.Current, null);
if ((int)db.ExecuteNonQuery(cmd) > 0)
i = (int)db.GetParameterValue(cmd, "RetVal");
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

IT seems that the XML file is not well formed, apparentely there is a \r\n
sequence somewhere where is not valid
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top