Hi there, I'm using the following code to open (or create and open if not the database is not present) ad then add a row to an e32db.
The database creates fine, but the
Code:
db.execute(sql_add)
line raises a
Code:
SymbianError:[Errno -6]KErrArgument
error. Have I malformed the SQL statement?
Code:
def db_write():  
    users_db = u'e:\\python\\ssusers.db' 
    sql_create = u'CREATE TABLE users (user VARCHAR, password VARCHAR)'
    myuser = appuifw.query(u'user?', 'text')
    mypwd = appuifw.query(u'password', 'text')
    sql_add = u'INSERT INTO users (user, password) VALUES (\"' + myuser + '\", \"' + mypwd + '\")'
    try:
        db = e32db.Dbms()
        db.open(users_db)
    except:
        db.create(users_db)
        db.open(users_db)
        db.execute(sql_create)
    db.execute(sql_add)
    db.close()