如 mysql.open "select * from table1,table2,table3 where table1.id=table2.id and table1.code=table3.id"
 查询出来的结果中有可能有几个字段是三个表中都有的,如:table1.id,table2.id......用mysql!table1.id表示时提示错误,应该怎样写才对?

解决方案 »

  1.   

    select A.*,B.ID As BID,C.Code As CCode from table1 A,table2 B,table3 C where A.id=B.id and A.code=C.id
      

  2.   

    我想知道的是:在语句不变的情况下,使用
    lblid.caption=mysql!table1.id  这样的意思。在delphi中是这样用的:lblid.caption:=mysql.fieldbyname('table1.id').as string
      

  3.   

    VB和delphi本来就不同,VB中使用的是COM的ADO对象,而delphi中你用的对象都不同
    怎么能这样要求呢?
    打个比方:你就像要求 Winsock控件 作出 PictureBox控件 的效果一样,根本就不是
    一个东西,怎么这样要求。
    搞VB程序就用VB的方法,不要把其他的语言概念放进来,因为很多时候会有很多不同的。
    就像搞VB的去编VC的程序还用VB的概念去编程,那就完蛋了。
      

  4.   


    mysql.open "select table1.id AS ID1,table2.id AS ID2,table3.id AS ID3 from table1,table2,table3 where table1.id=table2.id and table1.code=table3.id" 
    lblid.caption=mysql!ID1
    lblid2.caption=mysql!ID2