zoukankan      html  css  js  c++  java
  • 通用所有数据库的插件,按键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
  • 相关阅读:
    docker部署springBoot项目
    linux下查看文件内容命令
    nohup后台运行jar与关闭
    nohup优化输出nohup.out日志信息
    Go 精妙的互斥锁设计
    ts找不到全局对象,报错:Cannot find name '__dirname
    定义vscode终端主题色
    element-ui按需引入报错Cannot find module 'babel-preset-es2015' 及多组件引入报错
    c# UWP 墨迹 手写识别
    c# yield return
  • 原文地址:https://www.cnblogs.com/plug/p/8665127.html
Copyright © 2011-2022 走看看