当前位置:首页
开发技术指南» 文章正文
    引言:

 ·关于.eml文件的格式问题    »显示摘要«
    摘要: .eml文件有没有相关的标准,哪里可以找到,就是类似协议的东西, 对他的信头有详细的说明 ......
 ·初学者提问    »显示摘要«
    摘要: 一般讲的j2ee应用,是不是jsp,selevlet,structs,spring等结合应用? j2ee是不是也就是web开发这一块?书上讲的都不太清楚。 ......


vbman2003(家人)请进一下,你那天帮我弄的那个还有点小问题

http://community.csdn.net/Expert/topic/4065/4065952.xml?temp=.7573206  
   
  我运行后,添加进的数据库,每一条都重复地写进5次,如果有10条记录的话,写进数据库就变成50条了,这是怎么回事呢,我一直检查,也查不出错来

NO.1   作者: icedut

是不是txt文件内容重复呢

NO.2   作者: vbman2003

呵呵,想过头了,冰说的没错,哪儿不能用循环了  
  Option   Explicit  
   
  Private   Sub   Command1_Click()  
          Dim   cn   As   New   ADODB.Connection  
          Dim   rs   As   New   ADODB.Recordset  
          Dim   sql   As   String  
          Dim   strTest()   As   String  
          Dim   strString()   As   String  
          Dim   str   As   String,   strTxt   As   String  
          Dim   i  
          cn.Open   "Provider=Microsoft.Jet.OLEDB.4.0;   "   _  
                  &   "Data   Source="   &   App.Path   &   "\db1.mdb;Persist   "   _  
                  &   "Security   Info=False;Jet   OLEDB:Database   Password="  
          Open   App.Path   &   "\test.txt"   For   Input   As   #1  
          While   Not   EOF(1)  
                  Line   Input   #1,   str  
                  If   str   =   ""   Then   Exit   Sub  
                  strTxt   =   ""  
                  strTest   =   Split(str)  
                  For   i   =   0   To   UBound(strTest)  
                          If   strTest(i)   <>   ""   Then  
                                  strTxt   =   strTxt   &   strTest(i)   &   "/"  
                          End   If  
                  Next   i  
                  Debug.Print   strTxt  
                  strString   =   Split(strTxt,   "/")  
                  If   InStrRev(strString(2),   "福建",   ,   1)   Then  
                          sql   =   "insert   into   tb   (ip1,ip2,address,opt)   "   &   _  
                                  "values   ("   &   strString(0)   &   ","   &   strString(1)   &   ","   &   _  
                                  ""   &   strString(2)   &   ","   &   strString(3)   &   ")"  
                          cn.Execute   sql  
                  End   If  
          Wend  
          Close   #1  
          Set   cn   =   Nothing  
  End   Sub


    摘要: 我是access转为sql,奇怪的是投票完自动打开一个查看结果窗口,查看页面是正常的,可是没投票点查看就会出错,说在关键字 order 附近有语法错误,代码如下: dim sqlothervote,rsothervote sqlothervote="select * from vote where id<>" & id & " or......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE