Click here to Skip to main content
15,887,436 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Executable COM Pin
RYU^^7-Sep-08 16:31
RYU^^7-Sep-08 16:31 
Questionset values to charachter arrays which are entered [modified] Pin
toprogramminguy7-Sep-08 13:54
toprogramminguy7-Sep-08 13:54 
AnswerRe: set values to charachter arrays which are entered Pin
Vincen Wang7-Sep-08 15:04
Vincen Wang7-Sep-08 15:04 
GeneralRe: set values to charachter arrays which are entered [modified] Pin
toprogramminguy8-Sep-08 5:51
toprogramminguy8-Sep-08 5:51 
GeneralRe: set values to charachter arrays which are entered [modified] Pin
Vincen Wang8-Sep-08 16:09
Vincen Wang8-Sep-08 16:09 
GeneralRe: set values to charachter arrays which are entered Pin
toprogramminguy10-Sep-08 6:19
toprogramminguy10-Sep-08 6:19 
GeneralRe: set values to charachter arrays which are entered Pin
Vincen Wang15-Sep-08 15:03
Vincen Wang15-Sep-08 15:03 
Questioncannot open any more tables pls help Pin
GPat247-Sep-08 11:49
GPat247-Sep-08 11:49 
Cannot figure out i am doing wrong.
Program works fine, List with a check box. Initially ViewJob() is call in the On_InitDialog(). But on refreshing the data list after CheckBox check, get error saying "cannot open any more table"

//control notification
ON_NOTIFY(LVN_ITEMCHANGED, IDC_JOB_LIST, OnItemchangedLinksList)

//
void CICT_JOBS_ADMINDlg::OnItemchangedLinksList(NMHDR* pNMHDR, LRESULT* pResult)
{

CDaoDatabase onclickdb;
CDaoRecordset OnrecSet(&onclickdb);

int nItem = m_ViewJobs.GetItemCount();

CString strSQL;
onclickdb.Open("ICTNAS.mdb");

for(nItem =0 ; nItem < m_ViewJobs.GetItemCount();nItem++) {
BOOL bCheck = m_ViewJobs.GetCheck(nItem);
if( bCheck == 1)
{
CString sub = m_ViewJobs.GetItemText(nItem, 1);
OnrecSet.Open(AFX_DAO_USE_DEFAULT_TYPE,"SELECT * FROM Task WHERE Subject = '"+sub+"'",NULL);
OnrecSet.Edit();
OnrecSet.SetFieldValue("Task","TRUE");
OnrecSet.Update();
UpdateData(TRUE);
OnrecSet.Close();
onclickdb.Close();
ViewJobs(); *****Error With This line*****Refresh the Listbox***
}


}

*pResult = 0;


}
void CICT_JOBS_ADMINDlg::ViewJobs()
{

COleVariant var,varValue;
var.ChangeType(VT_BSTR, NULL);
CDaoDatabase vewdb;
CDaoRecordset rvewSet(&vewdb);

ListView_SetExtendedListViewStyle
(m_ViewJobs.m_hWnd, LVS_EX_CHECKBOXES | LVS_EX_GRIDLINES);

CString subJect,date;
vewdb.Open("ICTNAS.mdb"); // Open Clients.MDB
rvewSet.Open(AFX_DAO_USE_DEFAULT_TYPE,"SELECT * FROM Task WHERE Task=NO ",NULL);
while(!rvewSet.IsEOF()) // Do until EOF
{
int i = 0;

rvewSet.GetFieldValue("Subject",var);
subJect = (LPCSTR)var.pbstrVal;
m_ViewJobs.InsertItem(0,"",0);
m_ViewJobs.SetItemText(0,1,subJect);
rvewSet.GetFieldValue( "Start Date", varValue );
date = COleDateTime(varValue).Format(_T("%d/%m/%y"));
m_ViewJobs.SetItemText(0,2,date);
i=i++;
rvewSet.MoveNext();

}
rvewSet.Close();
vewdb.Close();
}

any help would be nice. Sniff | :^)

Gpat

AnswerRe: cannot open any more tables pls help Pin
Rane7-Sep-08 19:21
Rane7-Sep-08 19:21 
GeneralRe: cannot open any more tables pls help Pin
GPat248-Sep-08 1:49
GPat248-Sep-08 1:49 
QuestionRe: cannot open any more tables pls help Pin
Mark Salsbery8-Sep-08 6:29
Mark Salsbery8-Sep-08 6:29 
Questionsorting a CListCtrl by clicking on one of it's column's headers makes an arrow appear, but also makes the header appear flat Pin
Sternocera7-Sep-08 8:25
Sternocera7-Sep-08 8:25 
QuestionVirtual World Pin
MrMcIntyre7-Sep-08 4:23
MrMcIntyre7-Sep-08 4:23 
AnswerRe: Virtual World Pin
Perspx7-Sep-08 4:44
Perspx7-Sep-08 4:44 
GeneralRe: Virtual World Pin
AndrewMcIntyre7-Sep-08 5:03
AndrewMcIntyre7-Sep-08 5:03 
GeneralRe: Virtual World Pin
Cedric Moonen7-Sep-08 6:22
Cedric Moonen7-Sep-08 6:22 
AnswerRe: Virtual World Pin
Hamid_RT7-Sep-08 6:39
Hamid_RT7-Sep-08 6:39 
GeneralRe: Virtual World Pin
AndrewMcIntyre7-Sep-08 6:59
AndrewMcIntyre7-Sep-08 6:59 
Question'/RTC1' and '/clr' command-line options are incompatible [modified] Pin
rasred7-Sep-08 0:08
rasred7-Sep-08 0:08 
AnswerRe: '/RTC1' and '/clr' command-line options are incompatible Pin
Rane7-Sep-08 19:41
Rane7-Sep-08 19:41 
QuestionCallback with meber functions Pin
progDes6-Sep-08 20:48
progDes6-Sep-08 20:48 
AnswerRe: Callback with meber functions Pin
oobimoo7-Sep-08 8:26
oobimoo7-Sep-08 8:26 
GeneralRe: Callback with meber functions Pin
progDes7-Sep-08 8:38
progDes7-Sep-08 8:38 
Questionchange activex CLSID Pin
samira forooghi6-Sep-08 20:47
samira forooghi6-Sep-08 20:47 
AnswerRe: change activex CLSID Pin
Rane7-Sep-08 19:26
Rane7-Sep-08 19:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.