public int update(string table,string attributes, string values,string where)
{
string statement = "";
string[] _attributes = attributes.Split(',');
string[] _values = values.Split(',');
string delimer = ",";
if (_attributes.Length != _values.Length)
{
MessageBox.Show("Attributes and Values Must Match!");
}
else
{
for (int i = 0; i < _attributes.Length; i++)
{
if (i == _attributes.Length - 1)
{
delimer = "";
}
statement +=(_attributes[i]+"="+_values[i]+delimer);
}
}
statement +=" "+ where;
return mycon.nonqry("UPDATE " + table +" SET "+ statement);
}