SQLite Forum

(Deleted)
Login

Database Insert Problem

(1) By Sob Joker (JokerSob) on 2021-07-17 13:08:47 updated by 1.1 [link] [source]

There is a GUI built with Pyqt5 Qt and there is no id field on this GUI.I am trying to create SQLite3 database for this GUI.9 columns on GUI and There are 10 columns on the database. so i have problem in insert field. I've been getting errors for days.Since I am a student, I am just learning and I am having difficulties in this regard.Database codes are as follows:

global cur

global con
        
con = sqlite3.connect('DataBase.db')

cur = con.cursor()

cur.execute ("CREATE TABLE IF NOT EXISTS Visitors (NAME TEXT NOT NULL, PHONE TEXT NOT NULL, COMPANY TEXT NOT NULL,  PERSON TEXT NOT NULL, EXPLANATION TEXT NOT NULL, CARD_NO TEXT NOT NULL, DATE STRING NOT NULL, IN TEXT NOT NULL, OUT TEXT NOT NULL, ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT)")

con.commit()

con.close()

def InsertVisitors():

   con = sqlite3.connect('DataBase.db')

   cur = con.cursor()

   VisitorsName = self.ui.line_VisitorsName.text()

   VisitorsPhone = self.ui.line_VisitorsPhone.text()

   VisitorsCompany = self.ui.line_VisitorsCompany.text()

   VisitorsPersonDepartment = self.ui.line_VisitorsPersonDepartment.text()

   VisitorsExplanation = self.ui.text_VisitorsExplanation.text()

   VisitorsCardNo = self.ui.line_VisitorsCardNo.text()

   VisitorsDate = self.ui.label_VisitorsDate.text()

   if self.ui.check_VisitorsIn.isChacked():

      VisitorsIn = self.ui.line_VisitorsIn.text()

   else:

      VisitorsIn = self.ui.label_VisitorsTime.text()

   if self.ui.check_VisitorsOut.isChacked():

      VisitorsOut = self.ui.line_VisitorsOut.text()

   else:

      VisitorsOut = self.ui.label_VisitorsTime.text()

   cur.execute("INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, IN, OUT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut)) 
            
   con.commit()

   con.close()

I've been dealing with this problem for days, and I can't find a solution. Can you please give me an idea? Thank you so much in advance for your answers.

Database Insert Problem

(1.1) By Sob Joker (JokerSob) on 2021-07-17 13:54:08 edited from 1.0 updated by 1.2 [link] [source]

There is a GUI built with Pyqt5 Qt and there is no id field on this GUI.I am trying to create SQLite3 database for this GUI.9 columns on GUI and There are 10 columns on the database. so i have problem in insert field. I've been getting errors for days.Since I am a student, I am just learning and I am having difficulties in this regard.Database codes are as follows:

global cur

global con
        
con = sqlite3.connect('DataBase.db')

cur = con.cursor()

cur.execute ("CREATE TABLE IF NOT EXISTS Visitors (NAME TEXT NOT NULL, PHONE TEXT NOT NULL, COMPANY TEXT NOT NULL,  PERSON TEXT NOT NULL, EXPLANATION TEXT NOT NULL, CARD_NO TEXT NOT NULL, DATE STRING NOT NULL, IN TEXT NOT NULL, OUT TEXT NOT NULL, ID INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT)")

con.commit()

con.close()

def InsertVisitors():

      con = sqlite3.connect('DataBase.db')

      cur = con.cursor()

      VisitorsName = self.ui.line_VisitorsName.text()

      VisitorsPhone = self.ui.line_VisitorsPhone.text()

      VisitorsCompany = self.ui.line_VisitorsCompany.text()

      VisitorsPersonDepartment = self.ui.line_VisitorsPersonDepartment.text()

      VisitorsExplanation = self.ui.text_VisitorsExplanation.text()

      VisitorsCardNo = self.ui.line_VisitorsCardNo.text()

      VisitorsDate = self.ui.label_VisitorsDate.text()

      if self.ui.check_VisitorsIn.isChacked():

            VisitorsIn = self.ui.line_VisitorsIn.text()

      else:

            VisitorsIn = self.ui.label_VisitorsTime.text()

      if self.ui.check_VisitorsOut.isChacked():

            VisitorsOut = self.ui.line_VisitorsOut.text()

      else:

            VisitorsOut = self.ui.label_VisitorsTime.text()

      cur.execute("INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, IN, OUT) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut)) 
            
      con.commit()

      con.close()

      self.ui.Btn_In.clicked.connect(lambda: UIFunctions.InsertVisitors)

I've been dealing with this problem for days, and I can't find a solution. Can you please give me an idea? Thank you so much in advance for your answers.

(2) By Dan Kennedy (dan) on 2021-07-17 14:25:48 in reply to 1.1 [link] [source]

"IN" is a keyword. I think you'll need to call the column something else.

Can you see the error message from SQLite? It should have said as much.

(3) By Sob Joker (JokerSob) on 2021-07-17 17:23:21 in reply to 2 updated by 3.1 [link] [source]

I have no problem with the creation of tables and fields. Because tables and fields are created. IN = GIRIS_SAATI (actual field name in DB table) 

The area I'm having trouble with is the insert side below. Because there are 9 fields to enter data on the GUI and there are 10 columns on the database table.

cur.execute("INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut)) 

When I play on this area, I get various mistakes:

1-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 

The error I get when I do is: sqlite3.OperationalError: 10 values for 9 columns

2-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI, ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 

The error I get when I do is: sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 10, and there are 9 supplied.

3-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut, ID)

ID = "" , ? , NOT NULL, etc... when i assign a variable

The error I get when I do is: sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.

I think it is due to the fact that I cannot process the ID field.But I'm not sure

(3.1) By Sob Joker (JokerSob) on 2021-07-17 17:29:23 edited from 3.0 in reply to 2 updated by 3.2 [link] [source]

I have no problem with the creation of tables and fields. Because tables and fields are created. IN = GIRIS_SAATI (actual field name in DB table) 

The area I'm having trouble with is the insert side below. Because there are 9 fields to enter data on the GUI and there are 10 columns on the database table.

cur.execute("INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut)) 

When I play on this area, I get various mistakes:

1-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 

The error I get when I do is: sqlite3.OperationalError: 10 values for 9 columns

2-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI, ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 

The error I get when I do is: sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 10, and there are 9 supplied.

3-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut, ID)

ID = "" , ? , NOT NULL, etc... when i assign a variable

The error I get when I do is: sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.

4-) But I'm not sure

/* #cur.execute("INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut)) */ 

I think it is due to the fact that I cannot process the ID field.But I'm not sure

(3.2) By Sob Joker (JokerSob) on 2021-07-17 17:30:35 edited from 3.1 in reply to 2 updated by 3.3 [link] [source]

I have no problem with the creation of tables and fields. Because tables and fields are created. IN = GIRIS_SAATI (actual field name in DB table) 

The area I'm having trouble with is the insert side below. Because there are 9 fields to enter data on the GUI and there are 10 columns on the database table.

cur.execute("INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut)) 

When I play on this area, I get various mistakes:

1-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 

The error I get when I do is: sqlite3.OperationalError: 10 values for 9 columns

2-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI, ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 

The error I get when I do is: sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 10, and there are 9 supplied.

3-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut, ID)

ID = "" , ? , NOT NULL, etc... when i assign a variable

The error I get when I do is: sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.

4-) and when i close this field it opens GUI without problem

/* #cur.execute("INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut)) */ 

I think it is due to the fact that I cannot process the ID field.But I'm not sure

(4) By Larry Brasfield (larrybr) on 2021-07-17 18:52:03 in reply to 3.2 [link] [source]

1-) (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

The error I get when I do is: sqlite3.OperationalError: 10 values for 9 columns

That's because your INSERT only named 9 columns to receive values but provided 10 values. I think you need to read these error messages more carefully.

(5) By Sob Joker (JokerSob) on 2021-07-17 19:06:32 in reply to 4 updated by 5.1 [link] [source]

I read the error messages carefully and try to find various solutions, so I try various ways, but I have little knowledge and I am trying to get an idea of what I can do from here.

The mistake is here and now I am sure of it. But I don't know what to do and I've been looking for a solution for days to solve this

cur.execute("INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut))

How can I make this field work properly?

(6) By Keith Medcalf (kmedcalf) on 2021-07-17 21:44:13 in reply to 5.0 [link] [source]

What does the error message say? Have you read it?

(7) By Sob Joker (JokerSob) on 2021-07-17 22:20:03 in reply to 6 updated by 7.1 [link] [source]

Well, did you read what I wrote at the beginning of the topic?

#There is a GUI built with Pyqt5 Qt and there is no id field on this GUI.I am trying to create SQLite3 database for this GUI.9 columns on GUI and There are 10 columns on the database. so i have problem in insert field. I've been getting errors for days.Since I am a student, I am just learning and I am having difficulties in this regard.

that is, the ID will be generated by the database. No data entry will be made for this field on the GUI. That's why Database 10 column - GUI 9 column. I think I need to make the registration of the ID data in this field with a command such as WHERE or SELECT on the database.

(8) By Keith Medcalf (kmedcalf) on 2021-07-17 22:25:14 in reply to 7.0 [link] [source]

And still I have not seen the error message, other than the message that the number of values does not match the number of parameters. Now you seem to have fixed that problem by (as commanded by the error message) making the number of parameters equal to the number of values.

Now you claim to have yet another different problem.

It is also likely that the error message will tell you EXACTLY what you have done wrong, and EXACTLY what circumstance will correct the error. Have you read the error message? Do you even know what the purpose of an error message is (hint -- it may be to tell you that YOU have made an error that YOU need to correct).

Until you report the error message you are seeing there can be no help for you.

(9) By Ryan Smith (cuz) on 2021-07-17 22:26:27 in reply to 3.2 updated by 9.1 [link] [source]

```
cur.execute(
"INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI) 
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL)", 
(VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut, ID)
)
```

(9.1) By Ryan Smith (cuz) on 2021-07-17 22:27:45 edited from 9.0 in reply to 3.2 [link] [source]

cur.execute(
"INSERT INTO Visitors (NAME, PHONE, COMPANY, PERSON, EXPLANATION, CARD_NO, DATE, GIRIS_SAATI, CIKIS_SAATI, ID) 
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL)", 
(VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut)
)

(10) By Keith Medcalf (kmedcalf) on 2021-07-17 22:29:36 in reply to 8 [link] [source]

You will note that even your ORIGINAL posting did not state what error message you were receiving, nor where you received it. Merely that you were "having some" and you did not know what to do.

The answer you SHOULD have been given was:
(a) read the error message
(b) fix your error that caused the message to appear

It was a guessing game to determine what YOUR problem was THAT YOU CREATED FOR YOURSELF BY NOT PAYING ATTENTION TO ERROR MESSAGES.

If you do not report the actual error message received together with the exact SINGLE LINE on which the error occurred, there can be no help for you.

(11) By Sob Joker (JokerSob) on 2021-07-17 22:43:05 in reply to 9.1 updated by 11.1 [link] [source]

I have followed this path before and the error I get is:

sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported type.

(12) By Ryan Smith (cuz) on 2021-07-17 22:54:34 in reply to 11.0 [link] [source]

Those are wrapper errors in the wrapper (interface) you use, it's not SQLite errors.

I should think the Pyqt5 forum or usergroup should be able to shed some light on it.

With the error you get I would assume that "VisitorName" (which seems to be a string/text) is being pushed into a column that isn't so dedicated - not that SQLite would care about it, but the interface (wrapper) you use in Pyqt5 might care.

Do you have the database schema? Show how the table was created and we may perhaps have more thoughts, but honestly, you are far more likely to find help from the Pyqt5 people.

(13) By Keith Medcalf (kmedcalf) on 2021-07-17 23:09:56 in reply to 11.0 [link] [source]

That would indicate that the "type" of binding paramter 0 (the first one) (that is VisitorsName) is not a "type" that is recognized by the Python sqlite3.py wrapper.

The wrapper only recognizes the following native Python types:
- unicode text (str)
- integer (or long in py2)
- float
- bytearray/bytes/or other blob (buffer protocol conforming) type
- None

You need to look at the type(VisitorsName) and ensure that the reported type is one recognized by the sqlite3.py wrapper natively (listed above), or is one for which there exists either a prepare_protocol or other adapter registered.

(14) By Sob Joker (JokerSob) on 2021-07-17 23:16:06 in reply to 12 updated by 14.1 [link] [source]

cur.execute ("CREATE TABLE IF NOT EXISTS Visitors (AD_SOYAD TEXT NOT NULL, TELEFON TEXT NOT NULL, FIRMA_ADI TEXT NOT NULL, KISI_BOLUM TEXT NOT NULL, ACIKLAMA TEXT NOT NULL, KART_NO NUMERIC NOT NULL, TARIH TEXT NOT NULL, GIRIS_SAATI TEXT NOT NULL, CIKIS_SAATI TEXT NOT NULL, ID INTEGER NOT NULL UNIQUE PRIMARY KEY AUTOINCREMENT)")

dbss:
[url=https://ibb.co/Smny6mb][img]https://i.ibb.co/B6Z3f6b/DB.png[/img][/url]

GUI ss:
[url=https://ibb.co/w77xGLK][img]https://i.ibb.co/f99P6SC/QT.png[/img][/url]

The number of GUI code characters is too many, but I am creating an example by reducing it. On other forums I will share the codes after miniaturization.

When I close the field below, the '#' GUI opens. The problem is all about this area.

#cur.execute("INSERT INTO Visitors (AD_SOYAD, TELEFON, FIRMA_ADI, KISI_BOLUM, ACIKLAMA, KART_NO, TARIH, GIRIS_SAATI, CIKIS_SAATI, ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut))

(14.1) By Sob Joker (JokerSob) on 2021-07-17 23:16:34 edited from 14.0 in reply to 12 updated by 14.2 [link] [source]

cur.execute ("CREATE TABLE IF NOT EXISTS Visitors (AD_SOYAD TEXT NOT NULL, TELEFON TEXT NOT NULL, FIRMA_ADI TEXT NOT NULL, KISI_BOLUM TEXT NOT NULL, ACIKLAMA TEXT NOT NULL, KART_NO NUMERIC NOT NULL, TARIH TEXT NOT NULL, GIRIS_SAATI TEXT NOT NULL, CIKIS_SAATI TEXT NOT NULL, ID INTEGER NOT NULL UNIQUE PRIMARY KEY AUTOINCREMENT)")

dbss:
[url=https://ibb.co/Smny6mb][img]https://i.ibb.co/B6Z3f6b/DB.png[/img][/url]

GUI ss:
[url=https://ibb.co/w77xGLK][img]https://i.ibb.co/f99P6SC/QT.png[/img][/url]

The number of GUI code characters is too many, but I am creating an example by reducing it. On other forums I will share the codes after miniaturization.

When I close the field below, the '#' GUI opens. The problem is all about this area.

/*#cur.execute("INSERT INTO Visitors (AD_SOYAD, TELEFON, FIRMA_ADI, KISI_BOLUM, ACIKLAMA, KART_NO, TARIH, GIRIS_SAATI, CIKIS_SAATI, ID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL)", (VisitorsName, VisitorsPhone, VisitorsCompany, VisitorsPersonDepartment, VisitorsExplanation, VisitorsCardNo, VisitorsDate, VisitorsIn, VisitorsOut))*/

(15) By Keith Medcalf (kmedcalf) on 2021-07-17 23:25:53 in reply to 13 [link] [source]

The documentation for PyQt5 states that the .text() method on (what I presume) is an appropriate qt widget returns a QString. This object type is not recognized by sqlite3.py hence you get an error message telling you that you have used an "unsupported type" since only native Python types (unicode/str/int/long/float/None/buffer) are "supported" and the type you have used (QString) has no converter/adapter/protocol registered to transform it to/from a standard supported type.

(16) By Sob Joker (JokerSob) on 2021-07-17 23:26:23 in reply to 13 updated by 16.1 [link] [source]

I managed to get a different error now and I'm starting to investigate this right now. By the way, I really appreciate your interest, thank you very much.

new error i get:

VisitorsExplanation = self.ui.text_VisitorsExplanation.text()
AttributeError: 'PySide2.QtWidgets.QTextEdit' object has no attribute 'text'

I hope that after solving this problem, the errors I get are now gone

(16.1) By Sob Joker (JokerSob) on 2021-07-17 23:27:57 edited from 16.0 in reply to 13 updated by 16.2 [link] [source]

I managed to get a different error now and I'm starting to investigate this right now. By the way, I really appreciate your interest, thank you very much.

new error i get:

VisitorsExplanation = self.ui.text_VisitorsExplanation.text()

AttributeError: 'PySide2.QtWidgets.QTextEdit' object has no attribute 'text'

I hope that after solving this problem, the errors I get are now gone

(17) By Simon Slavin (slavin) on 2021-07-18 12:48:15 in reply to 16.1 [link] [source]

Your problem is with Python, not SQLite. The things you're doing work fine in SQLite. You will get better help asking in a Python forum.

(1.2) By Sob Joker (JokerSob) on 2021-07-27 20:36:18 edited from 1.1 updated by 1.3 [link] [source]

Deleted

(3.3) By Sob Joker (JokerSob) on 2021-07-27 20:36:32 edited from 3.2 in reply to 2 [link] [source]

Deleted

(5.1) By Sob Joker (JokerSob) on 2021-07-27 20:36:41 edited from 5.0 in reply to 4 [link] [source]

Deleted

(7.1) By Sob Joker (JokerSob) on 2021-07-27 20:36:46 edited from 7.0 in reply to 6 updated by 7.2 [source]

Deleted

(7.2) By Sob Joker (JokerSob) on 2021-07-27 20:36:55 edited from 7.1 in reply to 6 [link] [source]

Deleted

(11.1) By Sob Joker (JokerSob) on 2021-07-27 20:37:14 edited from 11.0 in reply to 9.1 [link] [source]

Deleted

(14.2) By Sob Joker (JokerSob) on 2021-07-27 20:37:21 edited from 14.1 in reply to 12 [link] [source]

Deleted

(16.2) By Sob Joker (JokerSob) on 2021-07-27 20:37:27 edited from 16.1 in reply to 13 updated by 16.3 [link] [source]

Deleted

(16.3) By Sob Joker (JokerSob) on 2021-07-27 20:37:39 edited from 16.2 in reply to 13 [link] [source]

Deleted

(1.3) By Sob Joker (JokerSob) on 2021-07-27 20:37:53 edited from 1.2 [link] [source]

Deleted