I have interfaced SQLite3 with my Am1808 processor. I store my data in the SDcard.
It is working very fine. I have inserted a table for 38 fields. Now I want to add a column in the same table. So I have changed the table fields parameters, and make the changes accordingly in the related files. My code successfully compiled but when I execute the application it gives me the following error:
Error : "38 columns for 39 Values"
Here is the Table which I have created with modification:
const char *SQL_CREATE_ABCTABLE = "CREATE TABLE IF NOT EXISTS MilkCollection \
( MilkCollectionId INTEGER, \
CollectionDate DATE, \
CollectionShift UNSIGNED TINYINT, \
MemberId INTEGER REFERENCES Member(MemberId) ON UPDATE RESTRICT ON DELETE RESTRICT, \
SocietyId INTEGER REFERENCES Society(SocietyId) ON UPDATE RESTRICT ON DELETE RESTRICT, \
SampleNo UNSIGNED INTEGER, \
MilkType UNSIGNED TINYINT, \
Qty FLOAT, \
ActualQty FLOAT, \
QtyType UNSIGNED TINYINT, \
Fat FLOAT, \
ActualFat FLOAT, \
LRCLR FLOAT, \
ActualLRCLR FLOAT, \
SNF FLOAT, \
ActualSNF FLOAT, \
Solid FLOAT, \
ActualSolid FLOAT, \
Water FLOAT, \ // I have inserted this field
FatKG FLOAT, \
ActualFatKG FLOAT, \
SNFKG FLOAT, \
ActualSNFKG FLOAT, \
Rate FLOAT, \
Amount FLOAT, \
ActualAmount FLOAT, \
CanNumber UNSIGNED INTEGER, \
MemberCodeAuto UNSIGNED TINYINT, \
WeightAuto UNSIGNED TINYINT, \
FatAuto UNSIGNED TINYINT, \
LRCLRAuto UNSIGNED TINYINT, \
SNFAuto UNSIGNED TINYINT, \
EntryMode UNSIGNED TINYINT, \
CreatedBy INTEGER REFERENCES UserMaster(UsermasterId) ON UPDATE RESTRICT ON DELETE RESTRICT, \
CreatedOn DATE, \
UpdatedBy INTEGER REFERENCES UserMaster(UsermasterId) ON UPDATE RESTRICT ON DELETE RESTRICT, \
UpdatedOn DATE, \
FlagGSM UNSIGNED TINYINT, \
FlagUSB UNSIGNED TINYINT, \
PRIMARY KEY (MilkCollectionId) )";
After creating this table I delete the old database file.
I am still getting this error.