Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: How do I get PasswordHash value?
03-28-2009, 12:31 AM #1
- Join Date
- Nov 2008
- Thanked 0 Times in 0 Posts
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