调试技巧:http://www.foxtable.com/webhelp/scr/1485.htm
……
ccmd.commandtext = "select cd From dhkzl where code = '" & r3("号段") & "' "
str5 = ccmd.ExecuteScalar()
msgbox(str5 )
ccmd.commandtext = "select cdzj From dhkzl where code = '" & r3("号段") & "' "
str6 = ccmd.ExecuteScalar()
msgbox(str6 )
Dim sds As Integer = right(left(r3("起始号"),str5),str6)
msgbox(sds )
Dim eds As Integer = right(left(r3("结束号"),str5),str6)
msgbox(eds )
……