VB 利用时间控件过站

发布时间:2020-06-13 22:44:18 作者:liaoliaome
来源:网络 阅读:494

使用SQL无源连接,须先点 工程 菜单 选择 引用 然后勾选Microsoft ActiveX Data Objects 2.8 Library和Microsoft ActiveX Data Objects Recordset 2.8 Library

Dim db As New ADODB.Connection

Dim rs As New ADODB.Recordset

Dim sql As String
Dim c As Integer
Dim d As Integer
Dim b As String
Private Sub Form_Load()
  db.Open "Provider=SQLOLEDB.1;Password=123;Persist Security Info=True;User ID=sa;Initial 
 
Catalog=DATABASENAME;Data Source=192.172.0.2"
End Sub
 
Private Sub Timer1_Timer()
  c = c + 1
  If c Mod 60 = 0 Then
    d = d + 1
    rs.Open "update mes_sn set fnextterminalid=1098 where fworkorderno='m3112039405' and fnextterminalid=1097 and 
 
fcurrentterminalid=1099", db
    b = Str(d)
    Label1.Caption = "已经执行第" + b + "次"
  End If
End Sub
推荐阅读:
  1. VB.net 是否该被看作VB的新版本?
  2. vb全称是什么

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

vb 职场 sql

上一篇:Windows Server 2008 R2使用WDS服务实现批量安装操作系统演示

下一篇:oracle12c数据库管理常用语句

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》