• 通用所有数据库的插件,按键TC易语言VB,VC,DELPHI调用 ACTIVEX DLL


    以按键精灵调用为例,以此类推

    //按键插件调用方式 SQLite
    ret = Plugin.DL.ConnectMyDB("SQLite", "", "12345678", "", "D: est.db", 0,"月卡卡号")
    If ret =1 Then 
           s = Plugin.DL.GetTable("SELECT * FROM people limit 0,10  ")
           MessageBox s
           //s = Plugin.DL.InsertSQL("insert into people(myname) values(1)")
           //MessageBox s        
           //s = Plugin.DL.UpdateSQL("update people set myname ='givl2' where id = 3")
           //MessageBox s
           //s = Plugin.DL.DeleteSQL("delete from people where id = 3")
           //MessageBox s
           //s = Plugin.DL.ExecSQL("insert into people VALUES('1','1','2','3','1','2')")
           //MessageBox s
           ret = Plugin.DL.CloseMyDB  
        Else 
      MessageBox ret            
    End If
     
    //按键插件调用方式 MySQL
    ret = Plugin.DL.ConnectMyDB("MySQL", "root", "1234560", "localhost", "studb", 3306,"月卡卡号")
    If ret =1 Then 
           s = Plugin.DL.GetTable("SELECT * FROM 本地学员 limit 0,10 ")
           MessageBox s
           //s = Plugin.DL.InsertSQL("insert into 本地学员(stuname) values(1)")
           //MessageBox s        
           //s = Plugin.DL.UpdateSQL("update 本地学员 set stuname ='givl' where id = 1")
           //MessageBox s
          // s = Plugin.DL.DeleteSQL("delete from 本地学员 where id = 1")
           //MessageBox s
           //s = Plugin.DL.ExecSQL("insert into 本地学员 VALUES('1','1','2','3','1','2')")
           //MessageBox s
           ret = Plugin.DL.CloseMyDB  
        Else 
      MessageBox ret            
    End If
     
     
    //按键插件调用方式 SQL Server
    ret = Plugin.DL.ConnectMyDB("SQL Server", "admin", "123456", "202.102.11.252", "datebase", 1433,"月卡卡号")
     
    If ret =1 Then 
           s = Plugin.DL.GetTable("SELECT top 10 * FROM whsw  ")
           MessageBox s
           //s = Plugin.DL.InsertSQL("insert into 本地学员(stuname) values(1)")
           //MessageBox s        
           //s = Plugin.DL.UpdateSQL("update 本地学员 set stuname ='givl' where id = 1")
           //MessageBox s
          // s = Plugin.DL.DeleteSQL("delete from 本地学员 where id = 1")
           //MessageBox s
           //s = Plugin.DL.ExecSQL("insert into 本地学员 VALUES('1','1','2','3','1','2')")
           //MessageBox s
           ret = Plugin.DL.CloseMyDB  
        Else 
      MessageBox ret            
    End If
     
    //按键插件调用方式 SQLite
    ret = Plugin.DL.ConnectMyDB("SQLite", "", "", "", "D: est.db", 0,"月卡卡号")
    If ret =1 Then 
           s = Plugin.DL.GetTable("SELECT * FROM people limit 0,10  ")
           MessageBox s
           //s = Plugin.DL.InsertSQL("insert into people(myname) values(1)")
           //MessageBox s        
           //s = Plugin.DL.UpdateSQL("update people set myname ='givl2' where id = 3")
           //MessageBox s
           //s = Plugin.DL.DeleteSQL("delete from people where id = 3")
           //MessageBox s
           //s = Plugin.DL.ExecSQL("insert into people VALUES('1','1','2','3','1','2')")
           //MessageBox s
           ret = Plugin.DL.CloseMyDB  
        Else 
      MessageBox ret            
    End If
     
    //按键插件调用方式 Access
    ret = Plugin.DL.ConnectMyDB("Access", "", "", "localhost", "D:my.accdb", 0,"月卡卡号")
    If ret =1 Then 
           s = Plugin.DL.GetTable("SELECT top 10 * FROM people ")
           MessageBox s
           //s = Plugin.DL.InsertSQL("insert into 本地学员(stuname) values(1)")
           //MessageBox s        
           //s = Plugin.DL.UpdateSQL("update 本地学员 set stuname ='givl' where id = 1")
           //MessageBox s
          // s = Plugin.DL.DeleteSQL("delete from 本地学员 where id = 1")
           //MessageBox s
           //s = Plugin.DL.ExecSQL("insert into 本地学员 VALUES('1','1','2','3','1','2')")
           //MessageBox s
           ret = Plugin.DL.CloseMyDB  
        Else 
      MessageBox ret            
    End If
     
    //按键插件调用方式 Oracle
    ret = Plugin.DL.ConnectMyDB("Oracle", "账号", "密码", "localhost", "", 0,"月卡卡号")
    If ret =1 Then 
           s = Plugin.DL.GetTable("SELECT top 10 * FROM people ")
           MessageBox s
           //s = Plugin.DL.InsertSQL("insert into 本地学员(stuname) values(1)")
           //MessageBox s        
           //s = Plugin.DL.UpdateSQL("update 本地学员 set stuname ='givl' where id = 1")
           //MessageBox s
          // s = Plugin.DL.DeleteSQL("delete from 本地学员 where id = 1")
           //MessageBox s
           //s = Plugin.DL.ExecSQL("insert into 本地学员 VALUES('1','1','2','3','1','2')")
           //MessageBox s
           ret = Plugin.DL.CloseMyDB  
        Else 
      MessageBox ret            
    End If
     
    网盘下载
    链接: https://pan.baidu.com/s/1oKn1osfUihLNEwyJ3oXRPw 密码: n4km
  • 相关阅读:
    Centos6.8通过yum安装mysql5.7
    查看mysql已安装
    canal client leader
    es按时间段统计总数
    nginx负载
    es 查看mapping 设置max_result_window
    es 修改默认bool条件个数
    less
    Less配置环境
    JavaScript面向对象与原型
  • 原文地址:https://www.cnblogs.com/plug/p/8665127.html
Copyright © 2020-2023  润新知