BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FieldByName when the same field exists.

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (ADO)
View previous topic :: View next topic  
Author Message
sky
Guest





PostPosted: Sun Oct 08, 2006 8:10 am    Post subject: FieldByName when the same field exists. Reply with quote



Hi all

2 Tables: T1(Fields: F1, F2, F3, F4, F5), T2(Fields: F1, F2, F6, F7)
I get a dataset with the sql statement:
select * from T1 LEFT OUTER JOIN T2 ON(T1.F1 = T2.F1 and T1.F2 = T2.F2);
because of the repeated fields F1 and F2
a error occured when I get the value of F1/F2 by using FieldByName() or
FieldValues[];
Error Message: 'MyADOQuery: Field 'F1' not found'

Any hint?

TIA

sky
Back to top
sky
Guest





PostPosted: Mon Oct 09, 2006 8:10 am    Post subject: Re: FieldByName when the same field exists. Reply with quote



I got it!

add the table name when using the repeated field just like 'T1.F1'
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (ADO) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.