Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
BobLewiston
Starting Member
29 Posts |
Posted - 2009-03-27 : 19:39:22
|
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.BeginEdit (); 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; row.EndEdit (); try{ dataAdapter.Update (dataSet, "Person.Contact");} catch (System.Runtime.InteropServices.ExternalException exc) { MessageBox.Show (exc.Message); }I get the following exception message: quote: 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:32-bitSQL Server 2008 Express with Advanced Servicesdatabase:SQL2008 AdventureWorks (schema.table: Person.Contact)SQL Server 2008 Management Studio ExpressVisual C# 2008 Express |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2009-03-30 : 12:10:17
|
| I assume this is an existing database with existing historical data. You'll need to find out what hash method is being used by the application.________________________________________________If it is not practically useful, then it is practically useless.________________________________________________ |
 |
|
|
|
|
|