SQLite Forum

Help me please, [Romanian Language script -> Error]
Login

Help me please, [Romanian Language script -> Error]

(1) By anonymous on 2020-08-23 07:25:31 [link] [source]

TEXT -> Error is 'No such column -> "Numele_Complet", what should i do? Please help me ! , from yesterday i'm trying to solve this but,i can't find the error.. Help me pls!


def save():
	conn = sqlite3.connect('Complet.db')
	
	global editor

	c = conn.cursor()
	record_id = delete_box.get()
	c.execute(''' UPDATE Complet SET 
		Numele_Complet=:nume,
		Adresa=:adresa,
		Orasul=:oras,
		Statul=:tara,
		Codul_Postal=:codpostal

		WHERE oid = :oid''',
		{
		'nume': Numele_Complet_e.get(),
		'adresa': Adresa_e.get(),
		'oras': Orasul_e.get(),
		'tara': Statul_e.get(),
		'codpostal': Codul_Postal_e.get(),

		'oid': record_id
		}
	)

	conn.commit()

	conn.close()

	editor.destroy()

(2) By Larry Brasfield (LarryBrasfield) on 2020-08-23 12:50:07 in reply to 1 [link] [source]

An early step in your debugging effort should be to use the SQLite CLI to examine your database. You can use its .schema meta-command to show the table definitions (among other schema items.) I will venture that the table known as "Complet" has no column named "Numele_Complet". Should that be so, then you need to either use the correct column name, create such a column, or sort out why you thought there should be such a column.

(3) By Kees Nuyt (knu) on 2020-08-23 12:50:43 in reply to 1 [source]

Impossible to tell without seeing your database schema.

sqlite3 Complet.db .schema

Is column Numele_Complet defined in table Complet ?

-- 
Regards,
Kees Nuyt