Mainly using SQL stored procedures
- Get the directory and files in the specified directory of the server
EXEC MASTER..xp_dirtree @ path = 'c: /', @ depth = 1, @ file = 1 - Parameters: directory name, directory depth, whether to display files
The tree part of this program encapsulates to DBServerFiletree.
1. Establish a dialog application, join a TreeCtrl control, add a control variable, base class is CDBSERVERFILETREE
CDBSERVERFILETREE M_TREE;
An Edit control, variable cstring m_name;
Add idb_directory bitmap in resources
, Size 66 * 16
And add ADO reference and initialization
2, add a message TVN_SELCHANGED
Add the following code:
HtreeItem M_HtreeItem;
m_htreeItem = m_tree.getSelectedItem ();
m_name = m_tree.getpathfromhere ("", m_htreeItem);
Updatedata (FALSE);
http://step2000.51.net/dbfile.rar