Note that there are some explanatory texts on larger screens.

plurals
  1. POInserting data into a Database
    text
    copied!<p>SO I'm making a "basic" login file where a person logs in and the data that person entered on that form gets transfered to another form aka my database/table.</p> <p>I think the problems is here but I'll post the rest of the code.</p> <pre><code>CREATE FUNCTION dbo.Function4 ( parameter1 int = 5, parameter2 datatype ) RETURNS Table1 TABLE (UserName, Password, Password_Confirmation, Assets) AS BEGIN INSERT INTO Table1 (UserName, Password, Password_Confirmation, Assets) VALUES (a,b,c,d); /*SELECT ... FROM ...*/ RETURN END </code></pre> <p>This is the Login Form</p> <pre><code>using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace Login_Basic { public partial class Form2 : Form { public Form2() { InitializeComponent(); } Form3 Delta = new Form3(); private void label3_Click(object sender, EventArgs e) { } private void Form2_Load(object sender, EventArgs e) { this.Hide(); } private void textBox6_TextChanged(object sender, EventArgs e) { } private void textBox6_KeyPress(object sender, KeyPressEventArgs e) { int i = Convert.ToInt32(e.KeyChar); if (!(Char.IsDigit(e.KeyChar) || Char.IsControl(e.KeyChar) || (e.KeyChar == '.' &amp;&amp; this.Text.Contains(".") == false))) e.Handled = true; } private void button1_Click(object sender, EventArgs e) { Delta.Show(); //if (textBox3.Text.Equals("")) //{ // MessageBox.Show("Please enter your username"); //} //else //{ // this.Hide(); //} // if (textBox4.Text.Equals("")) //{ // MessageBox.Show("Please enter your password"); // } // else //{ // this.Hide(); // } // if (textBox5.Text.Equals("")) // { // MessageBox.Show("Please re-enter your password"); // } // else // { // this.Hide(); // } //if (textBox6.Text.Equals("")) //{ // MessageBox.Show("Please enter your amount"); // // } // else // { // this.Hide(); // } } private void button3_Click(object sender, EventArgs e) { this.Hide(); } private void textBox3_TextChanged(object sender, EventArgs e) { } private void textBox4_TextChanged(object sender, EventArgs e) { } private void textBox5_TextChanged(object sender, EventArgs e) { } private void panel2_Paint(object sender, PaintEventArgs e) { /*if (textBox3.Text.Equals("") &amp;&amp; textBox4.Text.Equals("") &amp;&amp; textBox5.Text.Equals("") &amp;&amp; textBox6.Text.Equals("")) { button1.Enabled = false; } else { button1.Enabled = true; }*/ } } } </code></pre> <p>Here's a "Pic" of my database</p> <p><a href="http://s299.photobucket.com/albums/mm305/krsimms123/Code.jpg" rel="nofollow noreferrer">http://s299.photobucket.com/albums/mm305/krsimms123/Code.jpg</a></p> <p>Thanks in advance (I'll try and check this every few hours so I can help explain anything)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload