首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

又一个类型不匹配有关问题

2012-01-26 
又一个类型不匹配问题PublicSubNewSwitch(sNumAsInteger,ip1AsInteger,ip2AsInteger,ip3AsInteger,ip4AsIn

又一个类型不匹配问题
Public   Sub   NewSwitch(sNum   As   Integer,   ip1   As   Integer,   ip2   As   Integer,   ip3   As   Integer,   ip4   As   Integer)
Dim   strS   As   String
strS   =   Str(ip1)   +   ". "   +   Str(ip2)   +   ". "   +   Str(ip3)   +   ". "   +   Str(ip4)
'If   Fswitches.EOF   Then
'Fswitches.AddNew
Fswitches( "SwitchNum ")   =   sNum       *
Fswitches( "IP ")   =   strS                   *
Fswitches.Update
Fswitches.Close
'End   If
End   Sub
打*的两句都说类型不匹配
Dim   Fswitches   As   New   ADODB.Recordset
Fswitches.Open   "Listofswitches ",   FsConn,   adOpenDynamic,   2,   adCmdTable

Dim   FsConn   As   New   ADODB.Connection
str1   =   "provider=microsoft.jet.oledb.4.0; "
str1   =   str1   &   "data   source=FasDataBase.mdb; "
str1   =   str1   &   "persist   security   info=false "
FsConn.Open   str1

[解决办法]
sNum 也转换成String
[解决办法]
up
[解决办法]
Fswitches( "SwitchNum ") = sNum *
Fswitches( "IP ") = strS *
没见过在这样的语句.
用:
Fswitches.Fields( "SwitchNum ") = sNum *
Fswitches.Fields( "IP ") = strS *


[解决办法]
不明LZ在说什么

热点排行