void createDb()
{
query.exec("CREATE TABLE rider (id INTEGER PRIMARY KEY AUTOINCREMENT, "
"LName TEXT, FName TEXT, weight REAL, notes TEXT)"); //Table creates properly with all the fields
query.exec("INSERT INTO rider (FName, LName, weight)"
"VALUES ('Ryan', 'Villapoto',185)"); // Villapoto gets put into table as FName
query.exec("INSERT INTO rider (FName, LName, weight)"
"VALUES ('Jeremy', 'McGrath',155)"); // Nothing gets added
}
void createDb()
{
QSqlQuery query;
query.exec("CREATE TABLE rider (id INTEGER PRIMARY KEY AUTOINCREMENT, "
"LName TEXT, FName TEXT, weight REAL, notes TEXT)"); //Table creates properly with all the fields
query.exec("INSERT INTO rider (FName, LName, weight)"
"VALUES ('Ryan', 'Villapoto',185)"); // Villapoto gets put into table as FName
query.exec("INSERT INTO rider (FName, LName, weight)"
"VALUES ('Jeremy', 'McGrath',155)"); // Nothing gets added
}
To copy to clipboard, switch view to plain text mode
I am sure it is something simple....but I can't find it
Bookmarks