I have a problem when I try to insert some data on a table, I send all the values correct I think from a button, and my class catch all of them, even when I debug I can see all the values, all of them are inserted except 1, like observation I added that field on the table after the others, sometimes the fields recive some numbers but are not the numbers what I insert, numbers strangers like 7209071 and I'm trying to inser 1
this is my code on my button where I send the values:
_ClassX.MethodInsert(
Var, //int
Var2, //string
Var3, //string
Var4, //int
Var5 //int
);
TableX_ds.research();
And here is the method
public void BBP_InsertVenta(int Var1, str Var2, str Var3, int Var4, int Var5){
_TableX.FieldOnTable1=Var1;
_TableX.FieldOnTable2=Var2;
_TableX.FieldOnTable3=Var3;
_TableX.FieldOnTable4=Var4;
_TableX.FieldOnTable5=Var5; //This line is commented
_TableX.FieldOnTable6=Var5;
_TableX.insert();}
Is curious before have the field6, I was trying first insert on the field5 but after hours trying, I created the field6, but doesn't work again, the funny thing here is when I comented that field and try with the field6 the field5 recibe numbers like 7209071 but not all the time sometimes recibe empty values or 0
It could be because you're passing
.Net
values and not casting. In yourAX
method you could try changing it to this: