You can use: CDaoDatabase db; CString strDBFileName = "d:\\aaa.db"; db.Create(strDBFileName, dbLangGeneral, dbVersion30)
Sandra
Posts
-
How to create MS Access file at runtime? -
Windows 2000 performance monitorMay be your problem is that the buffers are not aligned to 8 bytes (in NT4 they had to be aligned to 32 bits) Check Event log for event 1016
-
How to GetItemText from a TreeView using right click?To your class derived from TreeView add to the message handler //{{AFX_MSG(CMyTreeView) afx_msg void OnRButtonDown(UINT nFlags, CPoint point); //}}AFX_MSG Implement the function OnRButtonDown as following void CMyTreeView::OnLButtonDown(UINT nFlags, CPoint point) { UINT uFlags; HTREEITEM hItem = GetTreeCtrl().HitTest(point, &uFlags); if ((hItem != NULL) && (uFlags & TVHT_ONITEM)) { CString strText = GetTreeCtrl().GetItemText(hItem); AfxMessageBox(strText); } }
-
CString to CHAR *str.GetBuffer(0) does the work. Don't forget to call str.ReleaseBuffer Also (LPSTR)(LPCSTR)str will be ok in the case you don't plan to play with the buffer