Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Hide And Seek? WhatHide And Seek? What's Up With That??
Previous
 
Next
New Post
3/2/2012 10:35 AM
 

I have a custom profile table in this DNN instance that I am trying to populate from the DNN UserProfile data using the DNNProfileInfo function in a trigger on the sql database. The problem seems to be that the Profile table simply in NOT being populated with the new information from the DNN registrations form. Here is the chain of events:

  1. A user fills the registration form and captcha
  2. Clicks the registration button
  3. Gets an error that the registration in not available.

I log in as administrator:

  1. I check the event log and see that the trigger tried to fire, but a required column is null so the insert fails.
  2. I check the user accounts and see that the user has been created.
  3. I click 'Manage Profile' of the user and discover that there is no profile data recorded.
  4. I am inserting the event log data and the trigger used and hope that someone might see what the error could be.

 

SQL SERVER 2008R2 TRIGGER on UserProfile Table:

ALTER TRIGGER [dbo].[trig_FamilyProfile]

ON [dbo].[UserProfile]
AFTER INSERT
AS

Begin
 SET NOCOUNT ON
 INSERT INTO dbo.jtp_Adult(UserID, FirstName, LastName, Gender, Birthdate, Email, Phone1, Phone2, TextMsg, City, State)
 SELECT dbo.Users.UserID, dbo.initCap(dbo.Users.FirstName)AS FirstName, dbo.initCap(dbo.Users.LastName) AS LastName, dbo.initCap(dbo.DNNProfileInfo(dbo.Users.UserID, N'Gender')) AS Gender,
   dbo.initCap(dbo.DNNProfileInfo(dbo.Users.UserID, N'Birthdate')) AS Birthdate, dbo.Users.Email, dbo.StandardPhone(dbo.DNNProfileInfo(dbo.Users.UserID, N'Phone1')) AS Phone1, dbo.StandardPhone(dbo.DNNProfileInfo(dbo.Users.UserID, N'Phone2')) AS Phone2,
   dbo.initCap(dbo.DNNProfileInfo(dbo.Users.UserID, N'TextMsg'))AS TextMsg, dbo.initCap(dbo.DNNProfileInfo(dbo.Users.UserID, N'City')) AS City, dbo.initCap(dbo.DNNProfileInfo(dbo.Users.UserID, N'Region')) AS State 
 FROM inserted INNER JOIN dbo.Users On inserted.UserID = dbo.users.UserID

End

 

TRACE INFO FROM EVENT LOG:

AssemblyVersion: 6.1.3

PortalID: 0

PortalName:

UserID: -1

UserName:

ActiveTabID: 41

ActiveTabName: Home

RawURL:

AbsoluteURL: /Default.aspx

AbsoluteURLReferrer:

UserAgent:

DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider

ExceptionGUID: aec702b5-0faa-4216-9d45-cb3d4c869c35

InnerException: Cannot insert the value NULL into column 'Gender', table 'garlandtenniscenter.garlandtennisce.jtp_Adult'; column does not allow nulls. INSERT fails. The statement has been terminated.

FileName:

FileLineNumber: 0

FileColumnNumber: 0

Method: System.Data.SqlClient.SqlConnection.

StackTrace:

Message: System.Data.SqlClient.SqlException: Cannot insert the value NULL into column 'Gender', table 'garlandtenniscenter.garlandtennisce.jtp_Adult'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection. (SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection. (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 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) at Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues) at DotNetNuke.Security.Membership.Data.SqlDataProvider.UpdateProfileProperty(Int32 profileId, Int32 userId, Int32 propertyDefinitionID, String propertyValue, Int32 visibility, DateTime lastUpdatedDate) at DotNetNuke.Security.Profile.DNNProfileProvider.UpdateUserProfile(UserInfo user) at DotNetNuke.Entities.Profile.ProfileController.UpdateUserProfile(UserInfo user) at DotNetNuke.Security.Membership.AspNetMembershipProvider.CreateUser(UserInfo& user)

 
New Post
3/2/2012 11:45 AM
 
Ok, I disabled the trigger and the profile data saved. So I wonder what is wrong with the trigger.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Hide And Seek? WhatHide And Seek? What's Up With That??


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out