海康vb.net代码 海康webcomponents

求vb.net的源代码,最好说明其解决问题,越多越好,满意加50分。

下面这段代码,是我用来计算每个月存500元进银行,连续30年,最后连本带利能有多少钱。这里面涉及复利计算。界面中右边的文本框用来输出每一次计算的结果。

10年的延安网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。成都营销网站建设的优势是能够根据用户设备显示端的尺寸不同,自动调整延安建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“延安网站设计”,“延安网站推广”以来,每个客户项目都认真落实执行。

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

  Dim nianxian As Integer '年限变量

  Dim dingcun As Integer '定存变量

  Dim fuli_big As Long '大复利

  Dim fuli_small As Long '小复利

  Dim i As Integer '循环变量

  Dim DATAstring As String '数据字符串

  nianxian = Val(年限_TextBox.Text)

  dingcun = Val(定存_TextBox.Text)

  DATAstring = ""

  For i = 1 To nianxian

      fuli_small = dingcun * (1 + 0.1875)

      dingcun = fuli_small

      fuli_big = fuli_big + fuli_small

      DATAstring = DATAstring + "[" + Trim(Str(i)) + "]" + Str(fuli_big) + Chr(13) + Chr(10)

      'DATAstring = DATAstring + "[" + Trim(Str(i)) + "]" + Str(fuli_small) + Chr(13) + Chr(10)

  Next

  'fuli_big = fuli_small

  TextBox1.Text = DATAstring

  结果_TextBox.Text = Str(fuli_big) + "元"

End Sub

VB.NET 注册代码

写两个函数,一个检测是否有重复用户,第二个插入

检测属用户是否存在

private function checkUser(byval uname as string) as boolean

dim sql as string = "select * from [user] where username=" uname

dim cmd as sqlcommand = new sqlcommand(sql,conn)

dim read as sqldatareader = cmd.excutereader

dim result as boolean = read.hasrows

cmd=nothing

return result

end function

新增用户

private sub adduser(byval uname as string,byval password as string)

if checkUser(uname)

messagebox.show("用户已存在")

exit sub

end if

try

dim sql as string = "insert into [user](username,password) values(@uname,@upass)"

dim cmd as sqlcommand = new sqlcommand(sql,conn)

cmd.parameters.add("@uname",sqldbtype.varchar).value=uname

cmd.parameters.add("@upass",sqldbtype.varchar).value=password

cmd.ExecuteNonQuery

cmd=nothing

messagebox.show("用户添加成功!")

catch ex As Exception

messagebox.show("用户添加失败!" + ex.message)

end try

end sub

海康威视错误代码大全

1、NET_DVR_NOERROR 0 没有错误。

2、NET_DVR_PASSWORD_ERROR 1 用户名密码错误。注册时输入的用户名或者密码错误。

3、NET_DVR_NOENOUGHPRI 2 权限不足。该注册用户没有权限执行当前对设备的操 作,可以与远程用户参数配置做对比。

4、NET_DVR_NOINIT 3 SDK 未初始化。

5、NET_DVR_CHANNEL_ERROR 4 通道号错误。设备没有对应的通道号。

6、NET_DVR_OVER_MAXLINK 5 连接到设备的用户个数超过最大。

7、NET_DVR_VERSIONNOMATCH 6 版本不匹配。SDK 和设备的版本不匹配。

8、NET_DVR_NETWORK_FAIL_CONNECT 7 连接设备失败。设备不在线或网络原因引起的连接超

9、NET_DVR_NETWORK_SEND_ERROR 8 向设备发送失败。

10、NET_DVR_NETWORK_RECV_ERROR 9 从设备接收数据失败。

11、NET_DVR_NETWORK_RECV_TIMEOUT 10 从设备接收数据超时。

12、NET_DVR_NETWORK_ERRORDATA 11 传送的数据有误。发送给设备或者从设备接收到的数 据错误,如远程参数配置时输入设备不支持的值。

13、NET_DVR_ORDER_ERROR 12 调用次序错误。

14、NET_DVR_OPERNOPERMIT 13 无此权限。

15、NET_DVR_COMMANDTIMEOUT 14 设备命令执行超时。

vb.net连接hana的代码

可以先创建对hana的ODBC连接ODBCNAME,然后:

''' summary

''' 根据SQL语句查询数据

''' /summary

''' param name="sql"SQL查询语句/param

''' returns结果集/returns

Public Function getDataSetBySql(sql As [String]) As DataSet

Try

Dim ds As New DataSet()

Dim command As New OdbcCommand(sql)

'command  对象

Dim connstring As [String] = "dsn=ODBCNAME;uid=USERID;pwd=PASSWORD"

'ODBC连接字符串

Using connection As New OdbcConnection(connstring)

'创建connection连接对象

command.Connection = connection

connection.Open()

'打开链接

Dim adapter As New OdbcDataAdapter(command)

'实例化dataadapter

adapter.Fill(ds)

'填充查询结果

Return ds

End Using

Catch ex As Exception

Throw New Exception(ex.Message)

End Try

End Function


文章名称:海康vb.net代码 海康webcomponents
文章位置:http://pwwzsj.com/article/dojhoco.html