YAFLogo

giapdv
  • giapdv
  • 50.6% (Neutral)
  • YAF Forumling Topic Starter
13 years ago
I login as admin, but i can not create any user. Here is error i saw in even log. Anybody can resolve for me?

System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'RankID', table 'forum_nv195.dbo.yaf_User'; column does not allow nulls. INSERT fails.

Cannot insert the value NULL into column 'UserID', table 'forum_nv195.dbo.yaf_UserGroup'; column does not allow nulls. INSERT fails.

The statement has been terminated.

The statement has been terminated.

at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)

at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)

at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)

at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)

at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)

at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)

at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

at YAF.Classes.Data.YafDBAccess.ExecuteNonQuery(SqlCommand cmd, Boolean transaction)

at YAF.Classes.Data.DB.user_save(Object userID, Object boardID, Object userName, Object displayName, Object email, Object timeZone, Object languageFile, Object culture, Object themeFile, Object useMobileTheme, Object approved, Object pmNotification, Object autoWatchTopics, Object dSTUser, Object hideUser, Object notificationType)

at YAF.Pages.Admin.reguser.ForumRegister_Click(Object sender, EventArgs e)

at System.Web.UI.WebControls.Button.OnClick(EventArgs e)

at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)

at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)

at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Sponsor
Chetan Bavarva
7 years ago
Try this

--> replace nvarchar(100) with the actual type of your column


ALTER TABLE yaf_User ALTER COLUMN Name nvarchar(100) NULL
ALTER TABLE yaf_UserGroup ALTER COLUMN UserID nvarchar(100) NULL


Chetan Patel

Custom software company India 

iFour Technolab Pvt. Ltd