Am getting a error when i attempt to insert a record in sqlite using python.
This is my code:
import sqlite3
db = sqlite3.connect('mydb')
ins_str = 'insert into filer_filer(number, ms_date, ms_time, mp_code, Amount, recipient_name,recipient_number, Tran_date, Tran_time, balance, userid_id ) values ('752098','09/09/16','17:54:19','K79NN251','5,000',' GWENDA WULFRIC','416','11/9/09','4:23 PM','396', -1)'
try:
db.execute(ins_str)
except:
db.close()
...
I get the following error
str: Traceback (most recent call last): File "C:\eclipse\plugins\org.python.pydev.debug_1.4.8.2881\pysrc\pydevd_vars.py", line 340, in evaluateExpression
result = eval(expression, updated_globals, frame.f_locals)
File "", line 1
except
^
SyntaxError: unexpected EOF while parsing
Gath
Edit
My new insert statement looks like this
"insert into filer_filer(number, sms_date, sms_time, mp_code, Amount, recipient_name,recipient_number, Tran_date, Tran_time, balance, userid_id ) values ('+254722752098','09/09/16','17:54:19','K79NN251','5,000',' GEOFFREY NZIOKA','254720425416','11/9/09','4:23 PM','396', -1)"