inserting or updating values into null textboxes [closed]
- by tanya
this is my sql table structure
create table cottonpurchase
(
slipNo int null,
purchasedate datetime,
farmercode int ,
farmername varchar (100),
villagename varchar (100),
basicprice int null,
premium int null,
totalamountpaid int null,
weight int null,
totalamountbasic int null,
totalamountpremium int null,
Yeildestimates int null
)
I want to fill in the null values in my sql with actual values and not leave them null but I want to do that from my winforms app form!
But if I do that it just adds a new record when what I want is for it to update the record which has, for example, farmercode = 2, farmername = blaah, and so on.
I also want to enter this in the same records as in farmercode = 2 and the corresponding corresponding basic price = ... , everytime i do it it ends up making a new record and not in the existing one.