VB 利用时间控件过站
2012-03-17 05:25
204 查看
使用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本文出自 “liaoliaome” 博客,请务必保留此出处http://ghostsoul.blog.51cto.com/436356/808338
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本文出自 “liaoliaome” 博客,请务必保留此出处http://ghostsoul.blog.51cto.com/436356/808338
相关文章推荐
- 利用VB.NET Stopwatch对象记录时间
- VB中那些小控件---日期时间控件
- 在vb中利用api函数代替picture控件画图总结
- 利用空余时间在完成一个Outlook框架控件,还有些Bug,完善中
- easy UI中利用JS获取当前月的第一天和最后一天,并显示到时间控件上
- 利用空余时间在完成一个Outlook框架控件,还有些Bug,完善中
- 利用BCGControlBar,打造工具栏上的时间控件
- 利用vb自制ocx控件
- VB 利用指针,来修改控件内容
- 利用JS实现Web日历控件(包括日期和时间)
- VB-控件注册 - 利用资源文件将dll、ocx打包进exe文件
- 利用VB自制OCX控件
- 控件注册 - 利用资源文件将dll、ocx打包进exe文件(VB版)
- 利用 Timer 控件在页面上显示实时时间
- 利用VB自制OCX控件
- 如何利用VB.NET修改系统时间
- [VB]利用API把一个控件绑定到另一个控件里
- Excel 利用日期控件输入时间
- VB中利用第三方控件实现QQ垂直菜单
- 利用秒数获取运行时间函数