문제

I am new to cx_Oracle and working on a project using Python3, and getting some errors. Here is my code:

    uemail="jack@gmail.com"
    uname="Jack"
    upassword="asdasd"
    cursInsert=connection.cursor()
    insert_stat="insert into users(email,name,pass,last_login) values (:uemail,:uname,:upassword,NULL)"
    cursInsert.execute(insert_stat)
    connection.commit()
    cursInsert.close() 

Here is the error message that I get: not all variables bound

Thanks

도움이 되었습니까?

해결책

You have to pass values to the bind variables for oracle like this

cursInsert.execute(insert_stat, uemail=uemail, uname=uname, upassword=upassword)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top