Click here to Skip to main content
15,908,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHelp me..... Pin
Ta_Tee4735-Aug-02 21:34
Ta_Tee4735-Aug-02 21:34 
GeneralRe: Help me..... Pin
Christian Graus5-Aug-02 22:07
protectorChristian Graus5-Aug-02 22:07 
GeneralUpdate Menu Pin
Mic5-Aug-02 21:13
Mic5-Aug-02 21:13 
GeneralRe: Update Menu Pin
Dor6-Aug-02 1:22
Dor6-Aug-02 1:22 
GeneralRe: Update Menu Pin
Mic6-Aug-02 2:14
Mic6-Aug-02 2:14 
GeneralIs it possible to do Pin
suresh_sathya5-Aug-02 20:15
suresh_sathya5-Aug-02 20:15 
GeneralRe: Is it possible to do Pin
RChin5-Aug-02 21:01
RChin5-Aug-02 21:01 
GeneralADO problem Pin
unknown soldier5-Aug-02 18:23
unknown soldier5-Aug-02 18:23 
I am writing a simple console application with MFC support in order to connect to Database using ADO. But having problems in the initial stages.

The main program looks something like this:

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
		_ConnectionPtr m_pConnection;

	          HRESULT hr;


	if(!AfxOleInit())
	{
		printf("\n COM initialization failed"); 
	}

hr = m_pConnection.CreateInstance( __uuidof( Connection ) );

	if (SUCCEEDED(hr))
		printf("\n createInstance successful");
              

         else
         printf("CreateInstance unsuccessful");



The problem is that CreateInstance is failing. Please tell me the problem if you find out.

Oh yea, i added following lines in StdAfx.h:

include <comdef.h>

#import "C:\program files\common files\system\ado\msado15.dll" \
			no_namespace \
			rename( "EOF", "adoEOF" )

GeneralRe: ADO problem Pin
RChin5-Aug-02 21:12
RChin5-Aug-02 21:12 
Generalnew class ... Pin
AlinRO5-Aug-02 18:04
AlinRO5-Aug-02 18:04 
GeneralRe: new class ... Pin
Nish Nishant5-Aug-02 18:21
sitebuilderNish Nishant5-Aug-02 18:21 
GeneralNested CLists Pin
Dor5-Aug-02 17:41
Dor5-Aug-02 17:41 
GeneralRe: Nested CLists Pin
Christian Graus5-Aug-02 18:28
protectorChristian Graus5-Aug-02 18:28 
GeneralRe: Nested CLists Pin
Chris Losinger5-Aug-02 18:30
professionalChris Losinger5-Aug-02 18:30 
QuestionHow to detect MS Terminal Service installs in the host oevr lan? Pin
xiao_heihei5-Aug-02 16:16
sussxiao_heihei5-Aug-02 16:16 
QuestionHow to set a file read only and hide attribute? Pin
Old Gun5-Aug-02 14:00
Old Gun5-Aug-02 14:00 
AnswerRe: How to set a file read only and hide attribute? Pin
Hydralisk5-Aug-02 15:02
Hydralisk5-Aug-02 15:02 
GeneralRe: How to set a file read only and hide attribute? Pin
Anonymous6-Aug-02 19:35
Anonymous6-Aug-02 19:35 
GeneralClick a Titlebar Pin
Steve L.5-Aug-02 13:54
Steve L.5-Aug-02 13:54 
GeneralRe: Click a Titlebar Pin
Shog95-Aug-02 14:43
sitebuilderShog95-Aug-02 14:43 
GeneralRe: Click a Titlebar Pin
Nish Nishant5-Aug-02 16:49
sitebuilderNish Nishant5-Aug-02 16:49 
GeneralRe: Click a Titlebar Pin
Shog95-Aug-02 17:37
sitebuilderShog95-Aug-02 17:37 
GeneralRe: Click a Titlebar Pin
Steve L.5-Aug-02 16:49
Steve L.5-Aug-02 16:49 
GeneralRe: Click a Titlebar Pin
Shog95-Aug-02 17:01
sitebuilderShog95-Aug-02 17:01 
GeneralRe: Click a Titlebar Pin
Steve L.5-Aug-02 17:04
Steve L.5-Aug-02 17:04 

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.