0 Replies - 1027 Views - Last Post: 02 October 2009 - 01:48 PM Rate Topic: -----

#1 coolnewt   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 24-September 09

Adding new record to SQL database.

Posted 02 October 2009 - 01:48 PM

I've written a form to pull information from a user and input into a db. This is what I've done so far:

-Built User Form with Submit button
-Setup Students.mdf
-Setup StudentsDataSet.xsd

Next step is to insert my first record into the database when I hit the Submit button on my form. I think I'm supposed to do something similar to this:

DataRow anyRow = StudentsDataSet.StudentInfoRow.NewRow();
				anyRow.LastName = LastName.Text;
				anyRow.FirstName = FirstName.Text;
ExistingTable.Rows.Add(anyRow);



However, when I get to

DataRow anyRow = StudentsDataSet.StudentInfoRow


intellisense doesn't show me an option for creating a new row.

Does anyone know what I'm missing? Also if anyone knows where I can find some good documentation for using C# and SQL that might help me out also. Thanks.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1