I've been setting up a portal registration system using Dynamic Registration 3.1. One of the requirements for the system is that it NOT retain credit card numbers in the database.
In working with Chad, he provided me the solution. Since it might help others, I'm sharing it here:
To remove the credit card number immediately after the transaction completes, set up a Completion Event, and select Dynamic SQL Statement.
If you want to delete the card number from just that module, use the following SQL Statement:
Delete from DynamicRegistration_QuestionResponse Where
DynamicQuestionID = (Select TOP 1 DynamicQuestionID from
DynamicRegistration_Question where ShortFieldName = 'shortFieldName' and moduleid = xxxx)
[Replace 'shortFieldName' with the short field name of the field utilized for the credit card number. Replace xxxx with the module ID for that instance of Dynamid Registration.]
Alternatively, if you want to delete the card number from all instances of Dynamic Registration throughout your DotNetNuke installation, where all affected instances utilize the same short field name, use the following SQL Statement:
Delete from DynamicRegistration_QuestionResponse Where DynamicQuestionID IN (Select DynamicQuestionID from DynamicRegistration_Question where ShortFieldName = 'shortFieldName' )
[Replace 'shortFieldName' with the short field name of the field utilized for the credit card number for all instances.]
One thing to avoid is mapping the credit card number field to the DNN core extended user fields, since the SQL statement doesn't remove it from the core user fields.
My thanks to Chad for helping with this.
Steve