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

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

//按键插件调用方式 SQLite
ret = Plugin.DL.ConnectMyDB("SQLite", "", "12345678", "", "D:\test.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:\test.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

转载于:https://www.cnblogs.com/plug/p/8665127.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值