Sql  =  "" 
Sql  =  "insert  into "  &  Text1(0).Text  &  "(title,cona,conb,conc,cond,cone,keys)  values  " 
Sql  =  Sql  &  "('"  &  Text1(1).Text  &  "'," 
Sql  =  Sql  &  Text1(2).Text  &  ","  &  Text1(3).Text  &  ","  &  Text1(4).Text  &  "," 
Sql  =  Sql  &  Text1(5).Text  &  ","  &  Text1(6).Text  &  ","  &  Text1(7).Text  &  ")"

解决方案 »

  1.   

    每个值都要加上单引号Sql = "" 
    Sql = "insert " & Text1(0).Text  & "(title,cona,conb,conc,cond,cone,keys)  values " 
    Sql = Sql & "('"  &  Text1(1).Text  &  "','" 
    Sql = Sql & Text1(2).Text & "','" & Text1(3).Text & "','" & Text1(4).Text  &  "','" 
    Sql = Sql & Text1(5).Text & "','" & Text1(6).Text &  "','" & Text1(7).Text & "')" 
      

  2.   

    insert 语句是不返回记录集的,所以set rs=cmd.execute不对.
    直接写call cmd.execute就可以了.
    如果想把新插入的记录返回来,最好用rs.addnew,然后赋值更新.
      

  3.   

    没错,文本的字段每个值都要加上单引号 Sql  =  ""  
    Sql  =  "insert into "  &  Text1(0).Text    &  "(title,cona,conb,conc,cond,cone,keys)    values  "  
    Sql  =  Sql  &  "('"    &    Text1(1).Text    &    "','"  
    Sql  =  Sql  &  Text1(2).Text  &  "','"  &  Text1(3).Text  &  "','"  &  Text1(4).Text    &    "','"  
    Sql  =  Sql  &  Text1(5).Text  &  "','"  &  Text1(6).Text  &    "','"  &  Text1(7).Text  &  "')"  
      

  4.   

    加了 单引号还是不行啊
    怎么回师?
    说    text(7).text还是类型不符合/
    难道真象fling_boy(男孩)说的?
    那解决办法是什么?
      

  5.   

    呵呵   在SQL SERVER中把 最后一个字段的类型给变了一下就可以了
    以前可能不是varchar   我把他改成varchar后   就可以了 
    散分喽!!!!!!!!!
    大家回家收衣服喽~~~~~