Click here to Skip to main content
15,568,963 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: help in creation of DLL in C++ Pin
ThatsAlok24-May-09 19:30
ThatsAlok24-May-09 19:30 
GeneralRe: help in creation of DLL in C++ Pin
Member 119741324-May-09 20:28
Member 119741324-May-09 20:28 
QuestionIs it Posibble to multithread a for loop Pin
FISH78623-May-09 12:16
FISH78623-May-09 12:16 
AnswerRe: Is it Posibble to multithread a for loop Pin
Stuart Dootson23-May-09 12:49
professionalStuart Dootson23-May-09 12:49 
AnswerRe: Is it Posibble to multithread a for loop Pin
ThatsAlok24-May-09 19:32
ThatsAlok24-May-09 19:32 
QuestionSimulate Keypress on a window Pin
nitin323-May-09 4:26
nitin323-May-09 4:26 
AnswerRe: Simulate Keypress on a window Pin
Stuart Dootson23-May-09 5:32
professionalStuart Dootson23-May-09 5:32 
QuestionMoveNext ( ) Pin
vital_parsley200023-May-09 1:58
vital_parsley200023-May-09 1: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 2:55
professionalStuart Dootson23-May-09 2:55 
GeneralRe: MoveNext ( ) Pin
vital_parsley200023-May-09 3:26
vital_parsley200023-May-09 3:26 
GeneralRe: MoveNext ( ) Pin
Stuart Dootson23-May-09 4:13
professionalStuart Dootson23-May-09 4:13 
GeneralRe: MoveNext ( ) Pin
vital_parsley200023-May-09 5:11
vital_parsley200023-May-09 5:11 
GeneralRe: MoveNext ( ) Pin
Stuart Dootson23-May-09 5:24
professionalStuart Dootson23-May-09 5:24 
GeneralRe: MoveNext ( ) Pin
vital_parsley200023-May-09 5:46
vital_parsley200023-May-09 5:46 
GeneralRe: MoveNext ( ) Pin
Stuart Dootson23-May-09 6:04
professionalStuart Dootson23-May-09 6:04 
General[Message Deleted] Pin
vital_parsley200024-May-09 22:07
vital_parsley200024-May-09 22:07 
GeneralRe: MoveNext ( ) Pin
Stuart Dootson25-May-09 1:40
professionalStuart Dootson25-May-09 1:40 
GeneralRe: MoveNext ( ) Pin
vital_parsley200025-May-09 6:09
vital_parsley200025-May-09 6:09 
QuestionCueBanner in vc6 Pin
ganesh.dp23-May-09 1:49
ganesh.dp23-May-09 1:49 
AnswerRe: CueBanner in vc6 Pin
Stuart Dootson23-May-09 2:51
professionalStuart Dootson23-May-09 2:51 
QuestionDial up Network Connection status dialog. Pin
birajendu23-May-09 1:39
birajendu23-May-09 1:39 
AnswerRe: Dial up Network Connection status dialog. Pin
Hamid_RT23-May-09 2:26
Hamid_RT23-May-09 2:26 
GeneralRe: Dial up Network Connection status dialog. Pin
birajendu23-May-09 2:53
birajendu23-May-09 2:53 
QuestionSocket programming Pin
rajeshbhushetty23-May-09 1:34
rajeshbhushetty23-May-09 1:34 
AnswerRe: Socket programming Pin
Rajesh R Subramanian23-May-09 1:42
professionalRajesh R Subramanian23-May-09 1: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.