| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 624 人关注过本帖
标题:[求助]为什么我的程序不能发push短信?
只看楼主 加入收藏
keke86
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-3-28
收藏
 问题点数:0 回复次数:0 
[求助]为什么我的程序不能发push短信?

Imports System.Timers
Imports System.Data
Imports System.Data.SqlClient
Imports System.Threading
Imports WAPPUSHLib
Module Module1

Public Sub Main()

Dim aTimer As New System.Timers.Timer
aTimer.BeginInit()
AddHandler aTimer.Elapsed, AddressOf ReadMyData
' Set the Interval to 5 seconds.
aTimer.Interval = 1000
aTimer.Enabled = True
aTimer.EndInit()

Console.WriteLine("Press 'q' to quit the sample.")
While Console.Read() <> CInt("q")

End While
End Sub

' Specify what you want to happen when the Elapsed event is raised.
Private Sub ReadMyData(ByVal source As Object, ByVal e As ElapsedEventArgs)
Dim wappush1 As New WapPushClass
wappush1.BaudRate = 115200
wappush1.ComPortNo = 1
wappush1.TimeExpires = 24

Dim myConnString As String = "server=localhost;database=ceshi_hu;uid=sa;pwd=;"
Dim myConnection As New SqlConnection(myConnString)
Dim mySelectQuery As String = "SELECT memo,cellphone,path FROM area where flag=1"
Dim myCommand As New SqlCommand(mySelectQuery, myConnection)
myConnection.Open()
Dim myReader As SqlDataReader
myReader = myCommand.ExecuteReader()
' Always call Read before accessing data.
While myReader.Read()

wappush1.PushMessage(myReader("cellphone"), myReader("memo"), myReader("path"))
Console.WriteLine((myReader("memo") & ", " & myReader("cellphone") & ", " & myReader("path")))
End While
' always call Close when done reading.
myReader.Close()
' Close the connection when done with it.
myConnection.Close()
End Sub
End Module

搜索更多相关主题的帖子: push 短信 
2006-03-28 22:47
快速回复:[求助]为什么我的程序不能发push短信?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015218 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved