loginstepDataContext db = new loginstepDataContext();
HttpCookie getCookie = Request.Cookies["info"];
CustomerOnly ds = new CustomerOnly(); //DataSet
CustomerTableAdapter da = new CustomerTableAdapter();
da.Fill(ds.Customer);
DataTable zip = ds.Tables[0];
int i = 0;
for (i = 0; i < zip.Rows.Count; i++)
{
if (zip.Rows[i][4].ToString() == getCookie.Values["username"])
break;
}
zip.Rows[i][1] = Convert.ToInt32(TextBox1.Text);
zip.Rows[i][1]=TextBox2.Text;
zip.Rows[i][2]=TextBox3.Text;
zip.Rows[i][3]=TextBox4.Text;
zip.Rows[i][4]=TextBox5.Text;
zip.Rows[i][5]=TextBox6.Text;
zip.Rows[i][6]=Convert.ToDouble( TextBox7.Text);
zip.Rows[i][7]=TextBox8.Text;
da.Update(ds.Customer);
Public Function CreateCmdsAndUpdate(ByVal connectionString As String, _
ByVal queryString As String) As DataSet
Using connection As New OleDbConnection(connectionString)
Dim adapter As New OleDbDataAdapter()
adapter.SelectCommand = New OleDbCommand(queryString, connection)
Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(adapter)
connection.Open()
Dim customers As DataSet = New DataSet
adapter.Fill(customers)
' Code to modify data in DataSet here
adapter.Update(customers)
Return customers
End Using
End Function