用户操作
[即时聊天] [发私信] [加为好友]
最近评论
文章分类
    收藏
      相册
      存档
      软件项目交易
      订阅我的博客
      XML聚合  FeedSky
      订阅到鲜果
      订阅到Google
      订阅到抓虾
      订阅到BlogLines
      订阅到Yahoo
      订阅到GouGou
      订阅到飞鸽
      订阅到Rojo
      订阅到newsgator
      订阅到netvibes

      转载 XML导入ACCESS数据库收藏

       | 旧一篇: 自己谈谈计算机职业等级划分

      <?xml version='1.0' encoding='gb2312'?>
      <students>
      <student id='1' name='wangxiaohua' sex='male' old='10'/>
      <student id='2' name='wangxiaohua1' sex='male' old='11'/>
      <student id='3' name='wangxiaohua2' sex='male' old='12'/>
      </students>

      set xdd=createobject("Msxml.domdocument")
      set con=createobject("adodb.connection")
      set rst=createobject("adodb.recordset")

      xdd.load
      "students.xml"
      '创建数据库
      if Not createobject("scripting.filesystemobject").fileexists("school.mdb") then
       
      createobject("adox.catalog").create "provider=microsoft.jet.oledb.4.0; data source=school.mdb" 
      end if
      con.open
      "provider=microsoft.jet.oledb.4.0; data source=school.mdb"
      con.execute
      "create table student (id integer primary key,name text(20), sex boolean,old integer)"
      rst.open
      "student",con,3,3,2
      for i=0 to xdd.doumentelement.childnodes.length-1
        
      set xdn=xdd.documentelement.childnodes.item(i)
         rst.addnew
         rst(
      "id")=cint(xdn.getattribute("id"))
         rst(
      "name")=xdn.getattribute("name")
         rst(
      "sex")=(xdn.getattribute("sex")="male")
         rst(
      "old")=cing(xdn.getattribute("old"))
         rst.update
      next
      con.close
       

       

      [转载]

      发表于 @ 2008年04月07日 11:42:00|评论(loading...)|编辑

       | 旧一篇: 自己谈谈计算机职业等级划分

      评论:没有评论。

      发表评论  


      当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
      Csdn Blog version 3.1a
      Copyright © 黄泽用