Well ... What i wanna do is to make a database with usernames and passwords .
I`ve made a program that adds a new line in the database but i don`t know how to save it and edit the new row.
So the dataset name is : Proiect
Table`s name : Table1
The line where i wanna add the username is : Username
The line where i wanna add the password is : Password
Both in table Table1
Also i have a TextBox for username and anotherone for password and a button wich should add them to the database , but it doesn`t . I got it working once but i didn`t save it and i forgot how i made .
Here`s my code so far :
Quote
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
proiectDataSet.Table1Row newrow;
newrow = proiectDataSet.Table1.NewTable1Row ();
proiectDataSet.Table1.Rows.Add(newrow);
this.table1TableAdapter.Update(this.proiectDataSet.Table1);
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'proiectDataSet.Table1' table. You can move, or remove it, as needed.
this.table1TableAdapter.Fill(this.proiectDataSet.Table1);
}
}
}
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
proiectDataSet.Table1Row newrow;
newrow = proiectDataSet.Table1.NewTable1Row ();
proiectDataSet.Table1.Rows.Add(newrow);
this.table1TableAdapter.Update(this.proiectDataSet.Table1);
}
private void Form1_Load(object sender, EventArgs e)
{
// TODO: This line of code loads data into the 'proiectDataSet.Table1' table. You can move, or remove it, as needed.
this.table1TableAdapter.Fill(this.proiectDataSet.Table1);
}
}
}
i didn`t make the code for the password yet becouse i`ll do it after i get the username thing working .
Thanks a lot :rolleyes:


Sign In
Create Account

Back to top









