473,379 Members | 1,253 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

SqlException i don't know what to do with

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(SqlExc eption exception,
Boolean breakConnection)\r\n at
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)\r\n at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.FinishExecuteRead er(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)\r\n at
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(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.InternalExecuteNo nQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe)\r\n at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() \r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.DoExecuteNonQuery(DbCommand
command)\r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteNonQuery(DbCommand
command)\r\n at
IVS.Framework.Logging.ErrorService.InsertError(Ide ntity 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");
Apr 17 '07 #1
2 7637
Looks like your "Data" parameter of type XML is not well-formed or legal XML.
Peter

--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net


"Dan Holmes" wrote:
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(SqlExc eption exception,
Boolean breakConnection)\r\n at
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)\r\n at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.FinishExecuteRead er(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)\r\n at
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(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.InternalExecuteNo nQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe)\r\n at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() \r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.DoExecuteNonQuery(DbCommand
command)\r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteNonQuery(DbCommand
command)\r\n at
IVS.Framework.Logging.ErrorService.InsertError(Ide ntity 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");
Apr 17 '07 #2
Hi,

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

"Dan Holmes" <da*******@bigfoot.comwrote in message
news:em**************@TK2MSFTNGP02.phx.gbl...
>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(SqlExc eption exception,
Boolean breakConnection)\r\n at
System.Data.SqlClient.SqlInternalConnection.OnErro r(SqlException
exception, Boolean breakConnection)\r\n at
System.Data.SqlClient.TdsParser.ThrowExceptionAndW arning(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.FinishExecuteRead er(SqlDataReader ds,
RunBehavior runBehavior, String resetOptionsString)\r\n at
System.Data.SqlClient.SqlCommand.RunExecuteReaderT ds(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.InternalExecuteNo nQuery(DbAsyncResult
result, String methodName, Boolean sendToPipe)\r\n at
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() \r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.DoExecuteNonQuery(DbCommand
command)\r\n at
Microsoft.Practices.EnterpriseLibrary.Data.Databas e.ExecuteNonQuery(DbCommand
command)\r\n at IVS.Framework.Logging.ErrorService.InsertError(Ide ntity
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");

Apr 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: sumithradevi | last post by:
Hello Friends, I am getting the following error. java.sql.SQLException: ORA-00020: maximum number of processes (100) exceeded I am closing all my resultsets and all my connections in the try...
2
by: stanley J mroczek | last post by:
System.Data.SqlClient.SqlException: General network error. Check your network documentation. I know that this is not much to go on. But I don't know where to start. the program updates 186 records...
0
by: stanley j mroczek | last post by:
System.Data.SqlClient.SqlException: General network error. Check your network documentation. I know that this is not much to go on. But I don't know where to start. the program updates 186 records...
1
by: ralamo | last post by:
INSERT INTO ECN_1 (Old_SbPartNo, Old_PartDesc, Old_ManPartNo, Old_Manuf, Old_Vendor, Old_RefDesi, Old_Qty, New_SbPartNo, New_PartDesc, New_ManPartNo,New_Manuf, New_Vendor, New_RefDesi, New_Qty)...
1
by: HK | last post by:
I just moved an ASP.NET application to a new web server at a different location of ours. The SQL Server machine was moved to that new location at the same time as the web site DNS was pointed to...
0
by: Paul | last post by:
Occasionally my users will try to perform an action and be presented with an exception raised directly from SQL Server, in example: SET @err = 'a user-friendly error condition message'...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
0
by: schm4704 | last post by:
Hi, I was wondering if there is a way to make the SQLException of the new JCC JDBC driver behave and get a decent message out of SQLException.getMessage(). Though I *do* know how to get the...
9
by: freethinker | last post by:
Hi, I have a database class I use to get and drop db connections: public class Database { protected static Connection c; //.... /// .. c = DriverManager.getConnection .... ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.