python封装的数据库查询
import aisino31
import nisec5
import ukey
import json
try:
nsrsbh = ''
db = '4400027101505001.0.ADFW3ERWERWEREW==.db'
sql = 'select * from xxfp '
sdata = aisino31.getdata(nsrsbh,db,sql)
data = json.loads(sdata, strict=False)
print('返回数据:',sdata)
nsrsbh = '52158001054050'
db = '48245044545_V5.dat'
sql = 'select * from zzs_fpkj'
sdata = nisec5.getdata(nsrsbh,db,sql)
data = json.loads(sdata, strict=False)
print('返回数据:',sdata)
nsrsbh = '91347807540540540'
db = '78822565852_UKey.dat'
sql = 'select *from zzs_fpkj'
sdata = ukey.getdata(nsrsbh,db,sql)
data = json.loads(sdata, strict=False)
print('返回数据:',sdata)
except Exception as e:
print('返回错误:',sdata)