供Python使用。
- pydb.pyd必须放在bin目录,且依赖的pkdbapi.dll等必须存在。
- 如果是oracle数据,还需要先安装oracle客户端,并配置数据源
import pydb
- pydb.Init(strDBType, strConnString, strUserName, strPassword, strCodingset)。返回数据库句柄dbHandle(整数),如果为0表示初始化失败
- pydb.InitFromConfig(),返回数据库句柄dbHandle(整数),如果为0表示初始化失败
- pydb.ExecuteSQL(strSQL),返回三元组(status,message,rows)
- pydb.Exit(dbHandle)。传入Init后InitFromConfig返回的句柄