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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRecordView in a CTabCtrl

Status
Not open for further replies.

Lars

Programmer
Aug 10, 2000
16
DE
Hi everybody!

I have to write a program that displays the content of database-tables. There has to be one Tabsheet for each table. Does anybody know a "smart" way of doing that ?
I thought of inserting RecordViews into the TabCtrl but I didn´t manage to get it to work yet.

Thanks in advance
 
> know a "smart" way of doing that ?

I don't know how 'smart' this is, but one way to do it would be to query each table when the user selects the tab. Then you only have one 'view' of the rows.

There is an old sample on MSDN (I think it's called DAOVIEW) that uses a 'Windows Explorer' UI to view tables and rows in an Access database. It uses DAO of course but all of that could be replaced with ADO or whatever you are using for connectivity. The code shows how to use a CListCtrl in 'Report' view to display the rows of the tables. Of course the tables are selected from the 'Tree' view on the left but it's the same idea.

Hope this helps
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top