new,name是关键字吧,表换个名字

解决方案 »

  1.   

    select * from new inner join stu on new.second=stu.namedelete * from new where third3 in (select distinct city from stu)
      

  2.   

    谢谢苦力:select * from new inner join stu on new.third3=stu.city
    这句好像还不行啊
      

  3.   

    The connection cannot be used to perform this operation.It is either
    closed or invalid in this context.
      

  4.   

    Cooly(苦力) :麻烦你了,非常感谢,这个问题怎么解决?
      

  5.   

    feasz(xx) :好像不是这个问题吧?:)
      

  6.   

    你的表中都是什么字段?表间关系是什么?
    select * from new inner join stu on new.third3=stu.city
    这句应该没有问题啊
      

  7.   

    select new.* from new,stu  where new.third3=stu.city
      

  8.   

    new.third3和stu.city类型一样吗
      

  9.   

    Private Sub Command4_Click()  
    dim str as string
    dim rst as new adodb.recordset
    str = "select * from new inner join stu on new.third3=stu.city"
    rst.Open str
    End Sub就是这些啊。。
      

  10.   

    gwlonghair(longhair):这句试过了,不行啊
    select new.* from new,stu  where new.third3=stu.city
      

  11.   

    dim str as string 改一下
    dim strSQL as string
      

  12.   

    Dim conn As New ADODB.Connection
    Dim rst As New ADODB.Recordset
    Dim strSQL, mdbFile As StringmdbFile="C:\VB\1.mdb"conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mdbFile & ";Persist Security Info=False"strSQL = "select * from new inner join stu on new.third3=stu.city"
    rst.Open strSQL, conn, 3, 1
      

  13.   

    adodb.connection已经定义了
    dim cnn as adodb.connection
    我再试试,谢谢各位了
      

  14.   

    hehe
    你在这
    还没解决吗?
      

  15.   

    Cooly(苦力):试了你这个,行的,
    搞不懂呀,一样的啊,怪了,不过谢谢你啊
      

  16.   

    minajo21(大眼睛):::真倒霉呀,真他妈的搞死我了
      

  17.   

    你的rst.open方法没有跟ADODB的连接,即Adodb.connection
      

  18.   

    再过2分钟结贴了,对于Cooly(苦力) 非常感谢 
     还有 minajo21(大眼睛)的‘慰问’
    谢谢大家
      

  19.   

    哦,毛病在这
    rst.Open str
    rst.Open str,cnn
      

  20.   

    Cooly(苦力) :你的rst.open方法没有跟ADODB的连接,即Adodb.connection????
    怎么跟?我已经定义 了啊。
      

  21.   

    哎,对了,谢谢minajo21(大眼睛)     :)