I'm getting a strang exception when I'm trying to create a member. The exception occurs on the following line:
//Create the member.
Member member = Member.MakeNew(loginName, DefaultObjects.MemberTypeIntranet, currentUser);
I get the following exception:
umbraco.DataLayer.SqlHelperException was unhandled by user code
Message="Umbraco Exception (DataLayer): SQL helper exception in ExecuteReader"
Source="umbraco.DataLayer"
StackTrace:
bij umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelper.cs:regel 244
bij umbraco.editorControls.DefaultDataKeyValue.ToXMl(XmlDocument d)
InnerException: System.Data.SqlClient.SqlException
Message="Incorrect syntax near ')'."
Source=".Net SqlClient Data Provider"
ErrorCode=-2146232060
Class=15
LineNumber=1
Number=102
Procedure=""
Server="sql.digibiz.nl"
State=1
StackTrace:
bij System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
bij System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
bij System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
bij System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
bij System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
bij System.Data.SqlClient.SqlDataReader.get_MetaData()
bij System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
bij System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
bij System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
bij System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
bij System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
bij System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
bij Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters, SqlConnectionOwnership connectionOwnership)
bij Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteReader(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters)
bij umbraco.DataLayer.SqlHelpers.SqlServer.SqlServerHelper.ExecuteReader(String commandText, SqlParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelpers\SqlServer\SqlServerHelper.cs:regel 77
bij umbraco.DataLayer.SqlHelper`1.ExecuteReader(String commandText, IParameter[] parameters) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\SqlHelper.cs:regel 240
InnerException:
Now the strange thing is after this exception the code just continues. After this I set some other member properties and they're just being set. When I debug the code just continues.
Sometimes I also get the following exception if I'm trying to read data:
System.InvalidOperationException was unhandled by user code
Message="Ongeldige leespoging; er zijn geen gegevens aanwezig."
Source="System.Data"
StackTrace:
bij System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i, Boolean setTimeout)
bij System.Data.SqlClient.SqlDataReader.ReadColumn(Int32 i)
bij System.Data.SqlClient.SqlDataReader.GetGuid(Int32 i)
bij umbraco.DataLayer.RecordsReaderAdapter`1.GetGuid(String fieldName) in d:\TeamCity\buildAgent\work\7380c184e9fcd3ea\umbraco\datalayer\RecordsReaderAdapter.cs:regel 263
bij umbraco.cms.businesslogic.datatype.DefaultData.get_Version()
bij umbraco.editorControls.tinyMCE3.TinyMCE.OnLoad(EventArgs e)
InnerException:
Does somebody know why these exceptions can occur? Also after this exception everything still works and the code just continues. Both exceptions don't cause any trouble, but I'd like to know why they happen. I'm using Umbraco 4.0.3. and I'm debugging with UltiDev Cassini Web Server.
Strange exceptions
Hello,
I'm getting a strang exception when I'm trying to create a member. The exception occurs on the following line:
I get the following exception:
Now the strange thing is after this exception the code just continues. After this I set some other member properties and they're just being set. When I debug the code just continues.
Sometimes I also get the following exception if I'm trying to read data:
Does somebody know why these exceptions can occur? Also after this exception everything still works and the code just continues. Both exceptions don't cause any trouble, but I'd like to know why they happen. I'm using Umbraco 4.0.3. and I'm debugging with UltiDev Cassini Web Server.
Jeroen
During the create you're missing one argument (Email). The function you're calling:
calls the other MakeNew function, as you can see, with this signature:
In here, an SQL parameter for email is set. Could be that, because it is an empty string, that this trips up the insert query?
I added the Email parameter, but it doesn't make any difference. I still get the exception and still everything works...
I just tried it on a clean version of Umbraco, but I still get the exceptions. Are more people having these exceptions?
is working on a reply...