db = sqlite3.connect("N:\WORK\Computing 4 Coursework\StockDataBaseSystem.db")
db.execute("CREATE TABLE Customers (Title str, FirstName str, LastName str, HouseNumber int, StreetName str, PostCode str, City str, PhoneNumber str, CustomerID str)")
db.execute("create table Products (ProductName text, Price int, Profit int, Sold int, InStock int, Size int, ProductID text)")
db.execute("create table Orders (TotalPrice float, TotalProfit float, DateOrdered date, DateDelivered date, QuantityOrdered int, OrderID text)")
db.commit()
My program is basically a GUI database software which allows to add customer details onto a database, everything works fine up to the point where it states 'No such table exists: Customers' whem I try to add a value onto a database. I have checked if I have not dropped the table somewhere but no I havent (Guessing that is good). My other 'Products' and 'Orders' table have been created on the database but not the Customers one which I find weird because the code is the same.. I would put the whole program up here but right now it is around 300 lines.
Aucun commentaire:
Enregistrer un commentaire