Sqlite3, OperationalError: unable to open database file

前端 未结 19 1639
再見小時候
再見小時候 2020-11-27 18:58

Question: Why can\'t I open the database?


Info: I\'m working on a project using sqlite3 database. I wrote a test program that runs and passes it t

19条回答
  •  情书的邮戳
    2020-11-27 19:10

    import sqlite3
    
    connection = sqlite3.connect("d:\\pythonAPI\\data.db")
    cursor = connection.cursor()
    create_table = "CREATE TABLE users (id int, username text, password text)"
    cursor.execute(create_table)
    


    for clearer full path if you didn't get it clear

提交回复
热议问题