Click here to Skip to main content
15,910,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: High CPU window on second monitor (DirectShow) Pin
Cpt Rick23-Feb-07 1:31
Cpt Rick23-Feb-07 1:31 
GeneralRe: High CPU window on second monitor (DirectShow) Pin
Mark Salsbery23-Feb-07 7:09
Mark Salsbery23-Feb-07 7:09 
QuestionSocket connection Pin
nahitan22-Feb-07 5:12
nahitan22-Feb-07 5:12 
AnswerRe: Socket connection Pin
Mila02522-Feb-07 6:26
Mila02522-Feb-07 6:26 
GeneralRe: Socket connection Pin
nahitan22-Feb-07 6:39
nahitan22-Feb-07 6:39 
GeneralRe: Socket connection Pin
Mark Salsbery22-Feb-07 7:33
Mark Salsbery22-Feb-07 7:33 
GeneralRe: Socket connection Pin
nahitan22-Feb-07 7:48
nahitan22-Feb-07 7:48 
QuestionCDBException while accessing slq server database using CDatabase class Pin
Cyber Friend22-Feb-07 4:12
Cyber Friend22-Feb-07 4:12 
Hi,
I am having a CDBException in my code which access sql server databse from VC6.

CDatabase pData;
CString strConnectionStr="Driver={SQL Server}; Server=local;Database=Northwind; UID=sa; PWD=sa;";
CString strSqlQuery=" update  Employees  set city='LondonUK' where city='london'";
try
{
	pData.Open(NULL,false,false,strConnectionStr);
}
catch(CDBException* dbExcep)
{
	dbExcep->ReportError();
	 return 0;

}
try
{
	pData.ExecuteSQL(strSqlQuery);// this is causing exception
}

catch(CDBException* dbExcep)
{
   AfxMessageBox(dbExcep->m_strError);
   switch( dbExcep->m_nRetCode) 
   {

	 case  AFX_SQL_ERROR_API_CONFORMANCE : 
		  AfxMessageBox("AFX_SQL_ERROR_API_CONFORMANCE");
                  break;
         case AFX_SQL_ERROR_CONNECT_FAIL:
		  AfxMessageBox("Connection to the data source failed");  
                  break;
         case  SQL_INVALID_HANDLE:   
               AfxMessageBox("Sql invalid handle");
	       break;
	 default :
	       AfxMessageBox("no result"); 
    }
    return 0; 
}		

in switch, result is SQL_INVALID_HANDLE.
Plz tell me where is the problem.

Cyber Friend
AnswerRe: CDBException while accessing slq server database using CDatabase class Pin
Mark Salsbery22-Feb-07 5:42
Mark Salsbery22-Feb-07 5:42 
GeneralRe: CDBException while accessing slq server database using CDatabase class Pin
Cyber Friend23-Feb-07 0:04
Cyber Friend23-Feb-07 0:04 
GeneralRe: CDBException while accessing slq server database using CDatabase class Pin
Mark Salsbery23-Feb-07 6:32
Mark Salsbery23-Feb-07 6:32 
GeneralRe: CDBException while accessing slq server database using CDatabase class Pin
Cyber Friend23-Feb-07 2:26
Cyber Friend23-Feb-07 2:26 
GeneralRe: CDBException while accessing slq server database using CDatabase class Pin
Mark Salsbery23-Feb-07 6:31
Mark Salsbery23-Feb-07 6:31 
AnswerRe: CDBException while accessing slq server database using CDatabase class [modified] Pin
prasad_som22-Feb-07 17:54
prasad_som22-Feb-07 17:54 
GeneralRe: CDBException while accessing slq server database using CDatabase class Pin
Cyber Friend23-Feb-07 0:09
Cyber Friend23-Feb-07 0:09 
Questionwindows keyboard hook / postmessage / sendmessage Pin
viral_umang@hotmail.com22-Feb-07 3:25
viral_umang@hotmail.com22-Feb-07 3:25 
AnswerRe: windows keyboard hook / postmessage / sendmessage Pin
Cedric Moonen22-Feb-07 3:32
Cedric Moonen22-Feb-07 3:32 
GeneralRe: windows keyboard hook / postmessage / sendmessage Pin
viral_umang@hotmail.com22-Feb-07 4:07
viral_umang@hotmail.com22-Feb-07 4:07 
GeneralRe: windows keyboard hook / postmessage / sendmessage Pin
Cedric Moonen22-Feb-07 4:17
Cedric Moonen22-Feb-07 4:17 
AnswerRe: windows keyboard hook / postmessage / sendmessage Pin
AprNgp22-Feb-07 6:26
AprNgp22-Feb-07 6:26 
QuestionReading text file.. Code works but how to include with rest program ? Pin
Software_Specialist22-Feb-07 3:00
Software_Specialist22-Feb-07 3:00 
GeneralRe: Reading text file.. Code works but how to include with rest program ? Pin
Programm3r22-Feb-07 3:41
Programm3r22-Feb-07 3:41 
QuestionRe: Reading text file.. Code works but how to include with rest program ? Pin
David Crow22-Feb-07 5:56
David Crow22-Feb-07 5:56 
GeneralRe: Reading text file.. Code works but how to include with rest program ? Pin
Mark Salsbery22-Feb-07 7:09
Mark Salsbery22-Feb-07 7:09 
QuestionDetection of USB device Pin
Vjys22-Feb-07 2:18
Vjys22-Feb-07 2:18 

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.