I'm doing a little project in my college and started messing with C # classes, but I'm having problems inserting (my amount of values in insert does not match values) in my DB and I'm not understanding. my User class:
private int _codigo;
private string _senha, _username;
private byte[] _vetorImagens;
public int Codigo
{
get
{
return _codigo;
}
set
{
_codigo = value;
}
}
public string Senha
{
get
{
return _senha;
}
set
{
_senha = value;
}
}
public string Username
{
get
{
return _username;
}
set
{
_username = value;
}
}
public byte[] VetorImagens
{
get
{
return _vetorImagens;
}
set
{
_vetorImagens = value;
}
}
public string Inserir()
{
return "insert into Usuario(Username,Senha,Foto) values ('" + _username+ "''" + _senha + "''" + _vetorImagens +"')";
}
}
}