Click here to Skip to main content
15,881,248 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: help in creation of DLL in C++ Pin
ThatsAlok24-May-09 18:30
ThatsAlok24-May-09 18:30 
GeneralRe: help in creation of DLL in C++ Pin
Member 119741324-May-09 19:28
Member 119741324-May-09 19:28 
QuestionIs it Posibble to multithread a for loop Pin
FISH78623-May-09 11:16
FISH78623-May-09 11:16 
AnswerRe: Is it Posibble to multithread a for loop Pin
Stuart Dootson23-May-09 11:49
professionalStuart Dootson23-May-09 11:49 
AnswerRe: Is it Posibble to multithread a for loop Pin
ThatsAlok24-May-09 18:32
ThatsAlok24-May-09 18:32 
QuestionSimulate Keypress on a window Pin
nitin323-May-09 3:26
nitin323-May-09 3:26 
AnswerRe: Simulate Keypress on a window Pin
Stuart Dootson23-May-09 4:32
professionalStuart Dootson23-May-09 4:32 
QuestionMoveNext ( ) Pin
vital_parsley200023-May-09 0:58
vital_parsley200023-May-09 0:58 
I am deleting a record from the table and then using the MoveNext()fucntion to move to the next record in the recordset.Below is the code for that.
How do i do that using the code below ??


<pre>void CSimpdbView::OnRecordsDelete()
{
CSimpdbDoc* pDoc=GetDocument();
_CommandPtr pCmd;
pCmd.CreateInstance(__uuidof(Command));
_ParameterPtr paramIsbn;
CString strIsbn;

CEdit* pEdit = (CEdit*)GetDlgItem(IDC_ISBN);
pEdit->GetWindowText(strIsbn);
_bstr_t sqlQuery("DELETE FROM lib WHERE ISBN = ?");

int val = MessageBox("This deletes the record.Continue ?",NULL,MB_OKCANCEL);
if(val == IDOK)
{
try
{
pCmd->ActiveConnection = pDoc->m_pConnection;
pCmd->CommandText=sqlQuery;

paramIsbn = pCmd->CreateParameter("strIsbn",adVarChar,adParamInput,-1,vtMissing);
paramIsbn->Value = (_variant_t)strIsbn;
pCmd->Parameters->Append(paramIsbn);

pCmd->Execute(NULL,NULL,adCmdText);
MessageBox("Record Deleted !",NULL,MB_OK);
pRs->MoveNext(); //Should move to the next reccord !
}

catch(_com_error &e)
{
TRACE( "Error:%08lx.\n", e.Error());
TRACE( "ErrorMessage:%s.\n", e.ErrorMessage());
TRACE( "Source:%s.\n", (LPCTSTR) _bstr_t(e.Source()));
TRACE( "Description:%s.\n", (LPCTSTR)_bstr_t(e.Description()));
}
catch(...)
{
TRACE("\n****Unhandled Exception****\n");
}
}
}


Help Please .Confused | :confused:
AnswerRe: MoveNext ( ) Pin
Stuart Dootson23-May-09 1:55
professionalStuart Dootson23-May-09 1:55 
GeneralRe: MoveNext ( ) Pin
vital_parsley200023-May-09 2:26
vital_parsley200023-May-09 2:26 
GeneralRe: MoveNext ( ) Pin
Stuart Dootson23-May-09 3:13
professionalStuart Dootson23-May-09 3:13 
GeneralRe: MoveNext ( ) Pin
vital_parsley200023-May-09 4:11
vital_parsley200023-May-09 4:11 
GeneralRe: MoveNext ( ) Pin
Stuart Dootson23-May-09 4:24
professionalStuart Dootson23-May-09 4:24 
GeneralRe: MoveNext ( ) Pin
vital_parsley200023-May-09 4:46
vital_parsley200023-May-09 4:46 
GeneralRe: MoveNext ( ) Pin
Stuart Dootson23-May-09 5:04
professionalStuart Dootson23-May-09 5:04 
General[Message Deleted] Pin
vital_parsley200024-May-09 21:07
vital_parsley200024-May-09 21:07 
GeneralRe: MoveNext ( ) Pin
Stuart Dootson25-May-09 0:40
professionalStuart Dootson25-May-09 0:40 
GeneralRe: MoveNext ( ) Pin
vital_parsley200025-May-09 5:09
vital_parsley200025-May-09 5:09 
QuestionCueBanner in vc6 Pin
ganesh.dp23-May-09 0:49
ganesh.dp23-May-09 0:49 
AnswerRe: CueBanner in vc6 Pin
Stuart Dootson23-May-09 1:51
professionalStuart Dootson23-May-09 1:51 
QuestionDial up Network Connection status dialog. Pin
birajendu23-May-09 0:39
birajendu23-May-09 0:39 
AnswerRe: Dial up Network Connection status dialog. Pin
Hamid_RT23-May-09 1:26
Hamid_RT23-May-09 1:26 
GeneralRe: Dial up Network Connection status dialog. Pin
birajendu23-May-09 1:53
birajendu23-May-09 1:53 
QuestionSocket programming Pin
rajeshbhushetty23-May-09 0:34
rajeshbhushetty23-May-09 0:34 
AnswerRe: Socket programming Pin
Rajesh R Subramanian23-May-09 0:42
professionalRajesh R Subramanian23-May-09 0:42 

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.