title: sqlite3.OperationalError: near ".": syntax error
body: <p>sqlite3.OperationalError: near ".": syntax error</p>
  
  <p>The above error comes while I try to fill the form.</p>
  
  <p>terminal:</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Users\username\AppData\Local\Programs\Python\Python37-32\lib\tkinter\__init__.py", line 1705, in __call__
      return self.func(*args)
    File "c:\Users\username\Desktop\Store Accounting Software\add_to_dy.py", line 64, in get_items
      c.execute(sql, (self.name, self.Stock,self.CP, self.SP, self.Total_CP, self.Total_SP, self.Assumed_Profits, self.Vendor, self.Vendor_no))
  sqlite3.OperationalError: near ".": syntax error
  </code></pre>
  
  <p>I have looked up all of the similar problems here but couldn't find a solution to it. Here is the source code I'd appreciate some help</p>
  
  <pre><code>from tkinter import *
  
  import sqlite3
  
  import tkinter.messagebox
  
  conn = sqlite3.connect(r"C:\Users\AAJU\Desktop\Store Accounting 
  
  Software\Database\store.db")
  
  c = conn.cursor()
  
  class Database:
  
      def __init__ (self, master, *args, **kwargs):
  
          self.master = master
          self.heading = Label(master, text = "Add to the database", font=('arial 40 bold'), fg='steelblue')
          self.heading.place(x=400, y=0)        
          self.name_l = Label(master, text="Enter Product Name", font=("arial 18 bold"))
          self.name_l.place(x=0, y=70)
          self.Stock_l = Label(master, text="Enter Stocks", font=("arial 18 bold"))
          self.Stock_l.place(x=0, y=120)
          self.CP_l = Label(master, text="Enter Cost Price", font=("arial 18 bold"))
          self.CP_l.place(x=0, y=170)
          self.SP_l = Label(master, text="Enter Selling Price", font=("arial 18 bold"))
          self.SP_l.place(x=0, y=220)
          self.Vendor_l = Label(master, text="Enter Vendor Name", font=("arial 18 bold"))
          self.Vendor_l.place(x=0, y=270)
          self.Vendor_no_l = Label(master, text="Enter Vendor Phone Number", font=("arial 18 bold"))
          self.Vendor_no_l.place(x=0, y=320)
  
          # Entries
          self.name_e = Entry(master, width=25, font = ("arial 18 bold"))
          self.name_e.place(x=380, y=70)
          self.Stock_e = Entry(master, width=25, font = ("arial 18 bold"))
          self.Stock_e.place(x=380, y=120)
          self.CP_e = Entry(master, width=25, font = ("arial 18 bold"))
          self.CP_e.place(x=380, y=170)
          self.SP_e = Entry(master, width=25, font = ("arial 18 bold"))
          self.SP_e.place(x=380, y=220)
          self.Vendor_e = Entry(master, width=25, font = ("arial 18 bold"))
          self.Vendor_e.place(x=380, y=270)
          self.Vendor_no_e = Entry(master, width=25, font = ("arial 18 bold"))
          self.Vendor_no_e.place(x=380, y=320)
  
          #Button to add to database
          self.btn_add = Button(master, text='Add to database', width = 25, height=2, bg='steelblue', fg = 'white', command=self.get_items)
          self.btn_add.place(x=520, y = 370)
  
          #Text Box
          self.tbox = Text(master, width=60, height=18)
          self.tbox.place(x=750, y=70)
      def get_items(self,*args, **kwargs):
          #get from entries
          self.name = self.name_e.get()
          self.Stock = self.Stock_e.get()
          self.CP = self.CP_e.get()
          self.SP = self.SP_e.get()
          self.Vendor = self.Vendor_e.get()
          self.Vendor_no = self.Vendor_no_e.get()
          self.Total_CP=float(self.CP) * float(self.Stock)
          self.Total_SP=float(self.SP) * float(self.Stock)
          self.Assumed_Profits = float((self.Total_SP) - (self.Total_CP))
  
          #After I added this block of code i got the error
  ------------------------------------------------------------------------------
          if self.name=='' or self.Stock=='' or self.CP=='' or self.SP=='':
              tkinter.messagebox.showinfo('Error','Required Field(s) empty')
          else:
              sql = "INSERT INTO inventory (Name, Stock, CP, SP, Total_CP, Total_SP, Assumed_Profits, Vendor, Vendor_No. ) VALUES(?,?,?,?,?,?,?,?,?)"
              c.execute(sql, (self.name, self.Stock,self.CP, self.SP, self.Total_CP, self.Total_SP, self.Assumed_Profits, self.Vendor, self.Vendor_no))
              conn.commit()
              tkinter.messagebox.showinfo('Success','Successfully Transferred into the database')
  
  
  ------------------------------------------------------------------------------
  root = Tk()
  
  b = Database(root)
  
  root.geometry('1366x768+0+0')
  
  root.title("Add to the database")
  
  root.mainloop()
  </code></pre>