Click here to Skip to main content
16,005,734 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: "friend" class question Pin
Polity4h1-Jan-07 4:10
Polity4h1-Jan-07 4:10 
QuestionData Exchange Pin
Shouvik Das1-Jan-07 0:16
Shouvik Das1-Jan-07 0:16 
AnswerRe: Data Exchange Pin
PJ Arends1-Jan-07 7:48
professionalPJ Arends1-Jan-07 7:48 
GeneralRe: Data Exchange Pin
Shouvik Das1-Jan-07 16:42
Shouvik Das1-Jan-07 16:42 
GeneralRe: Data Exchange Pin
Cristian Amarie2-Jan-07 3:58
Cristian Amarie2-Jan-07 3:58 
GeneralRe: Data Exchange Pin
Shouvik Das2-Jan-07 17:49
Shouvik Das2-Jan-07 17:49 
GeneralRe: Data Exchange Pin
Cristian Amarie2-Jan-07 20:42
Cristian Amarie2-Jan-07 20:42 
GeneralRe: Data Exchange Pin
Shouvik Das1-Jan-07 19:06
Shouvik Das1-Jan-07 19:06 
This is what when the admin module has to be invoked. A passsword validation is done. Later the Admin window opens.


void CLibManView::OnAdmin() 
{
	Pass p1;
	p1.DoModal();
	CString str,query,str1;
	int flag = 0;
	str=p1.m_pass;
	
	m_pSet->Close();
	query = "Select * from Password where User='Admin'";
	m_pSet->Open(CRecordset::dynaset, (LPCTSTR)query,CRecordset::none);
	m_pSet->MoveFirst();
	while(!m_pSet->IsEOF())
	{
		str1=m_pSet->m_Pass;
		if(str1==str)
		{
			flag=1;
			break;
		}
		m_pSet->MoveNext();
	}
	if(0==flag)
		MessageBox("Wrong Password");
	else
	{
		ad.DoModal();
		m_pSet->Close();
		char temp[2];
		itoa(ad.type,temp,2);
	         char locstat[2];
		itoa(2,locstat,2);
		query="insert into book values('"+ad.m_Auto_Ac_No+"','"+ad.m_Add_Name+"','"+ad.m_Add_Auth+"',"+temp+","+ad.m_Add_Price+",'"+ad.m_Add_Date+"',"+locstat+")";
		m_pSet->Open(CRecordset::dynaset,(LPCTSTR)query,CRecordset::none);
		m_pSet->Update();
		m_pSet->Close();
	}
}


So without closing the Admin dlg box how to update data. also i'm getting an error.
Syntax error in FROM clause on the above query.
plz help



Man can acquire accomplishments or he can become an animal, whichever he wants. God makes the animals, man makes himself.


G. C. Lichtenberg (1742-99), German physicist, philosopher.


SHSmile | :) UVIK

GeneralRe: Data Exchange Pin
PJ Arends2-Jan-07 5:39
professionalPJ Arends2-Jan-07 5:39 
GeneralRe: Data Exchange Pin
Shouvik Das2-Jan-07 17:51
Shouvik Das2-Jan-07 17:51 
GeneralRe: Data Exchange Pin
PJ Arends2-Jan-07 21:10
professionalPJ Arends2-Jan-07 21:10 
GeneralRe: Data Exchange Pin
Shouvik Das2-Jan-07 3:59
Shouvik Das2-Jan-07 3:59 
GeneralRe: Data Exchange Pin
Cristian Amarie3-Jan-07 8:12
Cristian Amarie3-Jan-07 8:12 
QuestionSending mails in VC++ Pin
Syamlal S Nair1-Jan-07 0:09
Syamlal S Nair1-Jan-07 0:09 
AnswerRe: Sending mails in VC++ Pin
PJ Arends1-Jan-07 8:01
professionalPJ Arends1-Jan-07 8:01 
GeneralRe: Sending mails in VC++ Pin
Syamlal S Nair1-Jan-07 17:37
Syamlal S Nair1-Jan-07 17:37 
AnswerRe: Sending mails in VC++ Pin
Hamid_RT1-Jan-07 17:22
Hamid_RT1-Jan-07 17:22 
GeneralRe: Sending mails in VC++ Pin
Syamlal S Nair1-Jan-07 17:37
Syamlal S Nair1-Jan-07 17:37 
QuestionHow to display progress bar in the list view control in win32 Pin
amitmistry_petlad 31-Dec-06 23:00
amitmistry_petlad 31-Dec-06 23:00 
AnswerRe: How to display progress bar in the list view control in win32 Pin
Mark Salsbery1-Jan-07 9:28
Mark Salsbery1-Jan-07 9:28 
GeneralRe: How to display progress bar in the list view control in win32 Pin
amitmistry_petlad 1-Jan-07 17:03
amitmistry_petlad 1-Jan-07 17:03 
QuestionPrevent ofstream from making same strings [modified] Pin
dellthinker31-Dec-06 16:50
dellthinker31-Dec-06 16:50 
AnswerRe: Prevent ofstream from making same strings Pin
Gary R. Wheeler1-Jan-07 4:44
Gary R. Wheeler1-Jan-07 4:44 
GeneralRe: Prevent ofstream from making same strings Pin
dellthinker2-Jan-07 9:46
dellthinker2-Jan-07 9:46 
QuestionNavigation Error Pin
Shouvik Das31-Dec-06 16:43
Shouvik Das31-Dec-06 16:43 

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.