PDA

View Full Version : Cannot open the Dalog(DataBase error) [modified]



Bsbosa.com
07-11-2010, 11:08 PM
Hi sir,
I am not able to open the dialog.

Its showing the error as.

"C:\DataBase\Sample.MDB" is not a valid path.Make sure that the path name is spelled correctly and that you are connected to the server on which the field resides.void CMainView::OnAdminlist()
{
AdminList.DoModal(); // I am getting error here

}

When i go into that function,i am getting error as
i.e \MFC\SRC\DLGCORE.cpp
TRY
{
// create modeless dialog
AfxHookWindowCreate(this);
Brekpoint error---------> if (CreateDlgIndirect(lpDialogTemplate,
CWnd::FromHandle(hWndParent), hInst))
{
if (m_nFlags & WF_CONTINUEMODAL)
{
// enter modal loop
DWORD dwFlags = MLF_SHOWONIDLE;
if (GetStyle() & DS_NOIDLEMSG)
dwFlags |= MLF_NOIDLEMSG;
VERIFY(RunModalLoop(dwFlags) == m_nModalResult);
}

// hide the window before enabling the parent, etc.
if (m_hWnd != NULL)
SetWindowPos(NULL, 0, 0, 0, 0, SWP_HIDEWINDOW|
SWP_NOSIZE|SWP_NOMOVE|SWP_NOACTIVATE|SWP_NOZORDER) ;
}
}
CATCH_ALL(e)
{
DELETE_EXCEPTION(e);
m_nModalResult = -1;
}
END_CATCH_ALL

Actually first the application was in MS-Access DatBase.I changed it to SQL.
Now i am not getting what is this error.

Note : nd one more thing is
If i am trying to open the application for the first time(If the DataBase which is created with MSAccess) name is changed
For ex: I rename the database from"DatBase" to "DataBase1"


I am getting the error message before opening the application.



>"C:\DataBase\Sample.MDB" is not a valid path.Make sure that the path name is spelled correctly and that you are connected to the server on which the field resides.
If i dnt change the DataBase name i am not getting this error message when i open the application
Where may be the problem
Any idea will be helpful

Thanks
Raj
modified on Saturday, July 10, 2010 12:43 AM