title: VIsual Studio WinForm connecting to SQL Server Database: C# syntax to transfer the data
body: <p>So I am just learning .NET, WinForms, SQL Server and C#.... I previously have used VB and MS Access, so I know this is a lot different but I am looking for a place to start.</p>
  
  <p>I typically used unbound forms for data entry in MS Access, then saved the data to tables on btn_Click, or button event handler with Visual Basic (DAO or SQL).</p>
  
  <p>So I have experimented with Visual Studio, creating WinForms with VB.NET &amp; C#, and SQL Server. I have learned how to created a WinForm, then through VS create a DB within, and databind form to database table.</p>
  
  <p>I haven't been able to reproduce the unbound form, and saving to external database through code (btn click) though. So lets say I already have created a Database through SSMS, and am now creating a WinForm for data entry. Now on the btn click, I am looking for the C# code that would transfer that entered data from the form to a database table.</p>
  
  <p>So for the sake of example let's say that the form only has one text box called txtData, and I want to transfer it to a Database named DBExample, in a Table named tblExample, and a field named fldExample.</p>
  
  <p>Can anyone help me with this. I have looked up a lot online about doing this, but everything i came across has to do with databinding the control, and I am looking for doing it through code. </p>
  
  <p>thanks
  justin</p>