Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using of two table in one CDaoRecordset object ...

Status
Not open for further replies.

HadiRezaee

Technical User
Mar 9, 2001
165
IR
Hi all,
I want to use of use of two table in only one CDaoRecordset object ...
Does i must use of two object ???
 
virtual void Open(
AFX_DAO_USE_DEFAULT_TYPE,
"select * from table1 union select * from table2",
);
John Fill
1c.bmp


ivfmd@mail.md
 
Hi John,
If i want to write value in NAME field in TABLE1 table then i write value in NAME field in TABLE2 !!!
How can i do that ?
 
Oh, you can't have two different tables or queries in one single statement. Each table/query must have its statement. John Fill
1c.bmp


ivfmd@mail.md
 
So, i must use of two object ?
Can i use of:
m_rs->SetFieldValue("TABLE1.NAME", "Hadi");

???

Is it true ?
 
I don't know the specific of DAO, but you can't make changes to two different objects at the same time(ie in one single statement). John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top