Date | Time | Subject |
15-1-2010 Friday | 9:00 A.M. to 10:30 A.M. | P101 : OOP using VC++ |
2:00 P.M. to 3:30 P.M. | P102 : Web Technology Concepts | |
16-1-2010 Saturday | 9:00 A.M. to 10:30 A.M. | P103 : DBMS & Advanced Database Administration |
2:00 P.M. to 3:30 P.M. | P104 : O.S & Network Management | |
21-1-2010 Thursday | 9:00 A.M. Onwards | P105 : Project - I |
Monday, January 11, 2010
Practical Exam Program
Friday, January 8, 2010
Friday, December 4, 2009
Database Connection Using DAO in VC++
File Name :: DAOConnView.cpp
Coding ::
void CDAOConnView::OnMoveFirst()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->MoveFirst();
UpdateData(FALSE);
}
void CDAOConnView::OnMovePrev()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->MovePrev();
if(m_pSet->IsBOF() == TRUE)
{
MessageBox("First Record","Alert");
m_pSet->MoveFirst();
}
UpdateData(FALSE);
}
void CDAOConnView::OnMoveNext()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->MoveNext();
if(m_pSet->IsEOF() == TRUE)
{
MessageBox("Last Record","Alert" );
m_pSet->MoveLast();
}
UpdateData(FALSE);
}
void CDAOConnView::OnMoveLast()
{
// TODO: Add your control notification handler code here
UpdateData();m_pSet->MoveLast();
}
void CDAOConnView::OnAdd()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->AddNew();
UpdateData(FALSE);
}
void CDAOConnView::OnSave()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->Update();
UpdateData(FALSE);
}
void CDAOConnView::OnUpdate()
{
// TODO: Add your control notification handler code here
m_pSet->Edit();
}
void CDAOConnView::OnDelete()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->Delete();
m_pSet->Requery();
m_pSet->MoveNext();
UpdateData(FALSE);
}
OLEDB CONNECTION IN VC++
public:
COledb_connectDoc* GetDocument();
bool flag;
COledb_connectView.cpp
void COledb_connectView::OnInitialUpdate()
{
m_pSet = &GetDocument()->m_oledb_connectSet;
{
CWaitCursor wait;
HRESULT hr = m_pSet->Open();
if (hr != S_OK)
{
AfxMessageBox(_T("Record set failed to open."), MB_OK);
// Disable the Next and Previous record commands,
// since attempting to change the current record without an
// open RecordSet will cause a crash.
m_bOnFirstRecord = TRUE;
m_bOnLastRecord = TRUE;
}
}
m_rollno=m_pSet->m_rollno;
m_marks=m_pSet->m_marks;
COleDBRecordView::OnInitialUpdate();
}
void COledb_connectView::Onfirst()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->MoveFirst();
m_rollno=m_pSet->m_rollno;
m_marks=m_pSet->m_marks;
UpdateData(false);
}
void COledb_connectView::Onlast()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->MoveLast();
m_rollno=m_pSet->m_rollno;
m_marks=m_pSet->m_marks;
UpdateData(false);
}
void COledb_connectView::Oninsert()
{
// TODO: Add your control notification handler code here
UpdateData();
m_rollno=0;
m_marks=0;
UpdateData(false);
}
void COledb_connectView::Onsave()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->m_rollno=m_rollno;
m_pSet->m_marks=m_marks;
if(flag==true)//if flag is true then update operation will perform
{
m_pSet->SetData();
}
else //if flag is true then INSERT operation will perform
{
m_pSet->Insert();
}
flag=false;
UpdateData(false);
}
void COledb_connectView::Onnext()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->MoveNext();
m_rollno=m_pSet->m_rollno;
m_marks=m_pSet->m_marks;
UpdateData(false);
}
void COledb_connectView::Onprevious()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->MovePrev();
m_rollno=m_pSet->m_rollno;
m_marks=m_pSet->m_marks;
UpdateData(false);
}
void COledb_connectView::Onupdate()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->m_rollno=m_rollno;
m_pSet->m_marks=m_marks;
m_pSet->Update();
flag=true;
UpdateData(false);
}
void COledb_connectView::Ondelete()
{
// TODO: Add your control notification handler code here
UpdateData();
m_pSet->Delete();
m_pSet->MoveFirst();
m_rollno=m_pSet->m_rollno;
m_marks=m_pSet->m_marks;
UpdateData(false);
}
Thursday, December 3, 2009
Practical Assignment
(9)