home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,687 of 10,840   
   Max Healey to Tony Van   
   Re: How do I get at this fieldname?   
   08 Oct 05 09:49:22   
   
   From: ok@spam-me.com   
      
    MySQL will return the fields any ambigous fields with their table name dot   
   field name so the following should work   
      
   debug.print rs.fields("workord.flag")   
   debug.print rs.fields("customer.flag")   
      
   or you could define the fields in your query   
      
   eg  "SELECT customer.flag AS CustomerFLAG, workord.flag AS workordFLAG " & _   
        " INNER JOIN customer ON  workord.cust_num =   
        customer.cust_num" & _   
        " WHERE workord.inv_num = '" & sInvNum & "'"   
      
      
      
   "Tony Van"  wrote in message   
   news:ud2dnQoEbYWuetveRVn-oA@comcast.com...   
   >I have this SQL statement in my VB code...   
   >   
   >   
   >    mySQL = "SELECT * FROM workord" & _   
   >    " INNER JOIN customer ON  workord.cust_num = customer.cust_num" & _   
   >    " WHERE workord.inv_num = '" & sInvNum & "'"   
   >   
   >    rs.Open mySQL, myConnection, adOpenDynamic, adLockOptimistic, adCmdText   
   >   
   > Basically doing an Inner Join on workord and customer via an invoice   
   > number field common   
   > to both.   
   >   
   > Problem is,both workord and customer have a field named "flag".   
   > Is there any way to access one (or the other) with ADO?   
   >   
   > Thanks for any help.   
   >   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca