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
  • 相关阅读:
    Arduino-串口函数Serial
    声之翼——超声波模块
    Arduino入门教程--课前准备--Arduino驱动安装及1.0 IDE菜单介绍
    光之触角——光敏电阻、光敏二极管、光敏三极管与光照发生器
    reactjs--父组件调用子组件的内部方法(转载)
    React怎么创建.babelrc文件
    第一课 矩阵的行图像与列图像(麻省理工公开课:线性代数)【转载】
    单片机引脚间状态传递(非转载)
    sublime text2卸载和重新安装(转载)
    C语言头文件怎么写?(转载)
  • 原文地址:https://www.cnblogs.com/plug/p/8665127.html
Copyright © 2011-2022 走看看