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

C / C++ / MFC

 
AnswerRe: EM_SETTABSTOPS and tab width in pixels? Pin
Moak8-Sep-09 4:46
Moak8-Sep-09 4:46 
AnswerRe: EM_SETTABSTOPS and tab width in pixels? Pin
ItaniumX29-Jan-10 7:34
ItaniumX29-Jan-10 7:34 
QuestionNon technical C++ question Pin
Ahmed Charfeddine8-Sep-09 0:34
Ahmed Charfeddine8-Sep-09 0:34 
QuestionRe: Non technical C++ question Pin
CPallini8-Sep-09 0:49
mveCPallini8-Sep-09 0:49 
JokeRe: Non technical C++ question Pin
Moak8-Sep-09 0:52
Moak8-Sep-09 0:52 
GeneralRe: Non technical C++ question Pin
Ahmed Charfeddine8-Sep-09 0:54
Ahmed Charfeddine8-Sep-09 0:54 
AnswerRe: Non technical C++ question Pin
Michael Schubert8-Sep-09 1:12
Michael Schubert8-Sep-09 1:12 
QuestionMySQL Can't create an instance of Command Pin
MsmVc8-Sep-09 0:19
MsmVc8-Sep-09 0:19 
Hi
I am useing ODBC 5.1 Driver for connect to MySQL.It's working fine for XP OS.I am getting error on Window Server.on server OS i an able to connect but after connection i am getting error.
Can't create an instance of Command 

code
	CString por="Driver={MySQL ODBC 5.1 Driver};";
	CString Database="Database="";";
	CString User="User=";
	CString Userp=root;
	CString password=";Password=";
	CString Passwords=root;
	CString option=";Option=3;";
	CString final=por;
	final +=Database;
	final +=User;
	final +=Userp;
	final +=password;
	final +=Passwords;
	final +=option;
	
	CoInitialize (NULL);
		
	_bstr_t strCon(final);

	try	
	{
		HRESULT hr = m_pConn.CreateInstance (__uuidof (Connection));

		if (FAILED (hr))
		{
			
		}
		
		if (FAILED (m_pConn->Open (strCon,bstrString,bstrString1,0)))
		{
			AfxMessageBox ("Can't open datasource");
		}
		GetDlgItemText(IDC_EDIT4,m_cbrow);
		GetDlgItemText(IDC_EDIT1,m_host);
		if(m_host=="localhost")
		{
		}
		else
		{
			MessageBox("There is an error to connect with MySQL. Please check your input parameters or server configuration.","Message",MB_ICONEXCLAMATION);
			return;
		}
		
			AfxMessageBox ("Connection successfully");	
		
			_CommandPtr pCommand;
			hr = pCommand.CreateInstance (__uuidof (Command));
<code>"Erro showing here"</code>
		if (FAILED (hr))
		{
			AfxMessageBox ("Can't create an instance of Command");
			return;
		}
			::_RecordsetPtr pRecordset;
			
			pCommand->ActiveConnection = m_pConn;

Plz help me.
AnswerRe: MySQL Can't create an instance of Command Pin
MsmVc8-Sep-09 2:08
MsmVc8-Sep-09 2:08 
GeneralRe: MySQL Can't create an instance of Command Pin
MsmVc8-Sep-09 18:31
MsmVc8-Sep-09 18:31 
QuestionCString count Pin
rdop7-Sep-09 23:19
rdop7-Sep-09 23:19 
AnswerRe: CString count Pin
Michael Schubert7-Sep-09 23:34
Michael Schubert7-Sep-09 23:34 
GeneralRe: CString count Pin
rdop7-Sep-09 23:37
rdop7-Sep-09 23:37 
JokeRe: CString count Pin
Cedric Moonen7-Sep-09 23:38
Cedric Moonen7-Sep-09 23:38 
GeneralRe: CString count Pin
Michael Schubert7-Sep-09 23:43
Michael Schubert7-Sep-09 23:43 
AnswerRe: CString count Pin
Cedric Moonen7-Sep-09 23:37
Cedric Moonen7-Sep-09 23:37 
JokeRe: CString count Pin
David Crow8-Sep-09 3:14
David Crow8-Sep-09 3:14 
AnswerRe: CString count Pin
Richard MacCutchan7-Sep-09 23:39
mveRichard MacCutchan7-Sep-09 23:39 
QuestionRe: CString count Pin
CPallini7-Sep-09 23:44
mveCPallini7-Sep-09 23:44 
AnswerRe: CString count Pin
rdop7-Sep-09 23:53
rdop7-Sep-09 23:53 
AnswerRe: CString count Pin
«_Superman_»8-Sep-09 0:26
professional«_Superman_»8-Sep-09 0:26 
QuestionHow to compare two HKEY handles Pin
i.dachev7-Sep-09 21:30
i.dachev7-Sep-09 21:30 
AnswerRe: How to compare two HKEY handles Pin
Christian Graus7-Sep-09 21:38
protectorChristian Graus7-Sep-09 21:38 
GeneralRe: How to compare two HKEY handles Pin
i.dachev7-Sep-09 21:56
i.dachev7-Sep-09 21:56 
GeneralRe: How to compare two HKEY handles Pin
Garth J Lancaster7-Sep-09 22:03
professionalGarth J Lancaster7-Sep-09 22:03 

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.