标题: window10下连接数据库报OperationalError: disk I/O error [打印本页] 作者: silen_lu 时间: 2017-10-10 15:36 标题: window10下连接数据库报OperationalError: disk I/O error 这是我的代码:
import sqlite3
conn=sqlite3.connect("E:/pythonscripts/templates/MovieSite.db")
print("connect successful")
c = conn.cursor()
c.execute('create table movie(title,year,country,abstract)')
print("creat table successful")
c.execute("insert into movie values ('阿甘正传',1994,'美国','Life is like a box of chocolates.')")
c.execute("insert into movie values ('肖申克的救赎',1994,'美国','Hope is a good thing.')")
c.execute("select * from movie")
conn.commit()
conn.close()