How do I get PasswordHash value?
When I try to save a new (inserted) record via the following code:
DataRow row = dataTable.Rows [currRec];
// update data in DataSet from data entry WinForm
row ["Title"] = txtTitle.Text;
row ["FirstName"] = txtFirstName.Text;
row ["MiddleName"] = txtMiddleName.Text;
row ["LastName"] = txtLastName.Text;
row ["Suffix"] = txtSuffix.Text;
row ["Phone"] = txtPhone.Text;
row ["EmailAddress"] = txtEmailAddress.Text;
dataAdapter.Update (dataSet, "Person.Contact");
catch (System.Runtime.InteropServices.ExternalException exc)
I get the following exception message:
Cannot insert the value NULL into column 'PasswordHash', table 'AdventureWorks.Person.Contact'; column does not allow nulls. INSERT fails. The statement has been terminated.
How do I get an appropriate PasswordHash value that I can put it in the newly-created record I'm inserting into the database?
For what itís worth, the environment Iím working in is:
SQL Server 2008 Express with Advanced Services
database:SQL2008 AdventureWorks (schema.table: Person.Contact)
SQL Server 2008 Management Studio Express
Visual C# 2008 Express