久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      python是如何操作access數(shù)據(jù)庫的

      python是如何操作access數(shù)據(jù)庫的

      python操作access數(shù)據(jù)庫最常用的方法就是使用pyodbc庫。

      具體看如下代碼:

      # -*- coding: utf-8 -*-   # 功能:python連接access2010數(shù)據(jù)庫(.accdb)     import pyodbc      DBfile = r"h:xiaoneixnzy.accdb"  # 數(shù)據(jù)庫文件   conn = pyodbc.connect(r"Driver={Microsoft access Driver (*.mdb, *.accdb)};DBQ=" + DBfile + ";Uid=;Pwd=;charset='utf-8';")   #用charset設(shè)置字符集     cursor = conn.cursor()   SQL = '''insert into table1 (title,type,) values ('通知','通知公告')'''   #注意:在SQL語句中必須用單引號(hào)',使用雙引號(hào)"pyodbc會(huì)提示錯(cuò)誤,整個(gè)語句可以用三引號(hào)。   cursor.execute(SQL) conn.commit()   cursor.close()   conn.close()

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)