您的当前位置:首页正文

金税盘3.1、百旺V5、UKEY数据库

2024-11-28 来源:个人技术集锦

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) 
显示全文