| | |
Ado connection problem
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2008
Posts: 42
Reputation:
Solved Threads: 0
hi
i created an application in vc++/MFC
now iam using ado to connect to the databaase
but there is aproblem i couldnot find any solution for it ....pleeease help
the problem is this error :
error C2146: syntax error : missing ';' before identifier 'm_pConn'
while iam defining : in stdafx.h
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
no_namespace \
rename( "EOF", "adoEOF" )
and in the main class i define :
public:
_ConnectionPtr m_pConn;
i searched about this error and it all seemed about the # import
but i couldnot find any anything wrong about it
pleeease help me
its driving me crazy
i created an application in vc++/MFC
now iam using ado to connect to the databaase
but there is aproblem i couldnot find any solution for it ....pleeease help
the problem is this error :
error C2146: syntax error : missing ';' before identifier 'm_pConn'
while iam defining : in stdafx.h
#import "C:\Program Files\Common Files\System\ADO\msado15.dll" \
no_namespace \
rename( "EOF", "adoEOF" )
and in the main class i define :
public:
_ConnectionPtr m_pConn;
i searched about this error and it all seemed about the # import
but i couldnot find any anything wrong about it
pleeease help me
its driving me crazy
Last edited by lahom; Jun 8th, 2008 at 1:27 pm.
•
•
Join Date: Nov 2007
Posts: 978
Reputation:
Solved Threads: 208
Check in the generated msado15.tlh if it contains the ADODB namespace.
i.e. see can you find the following in it
I guess it does, in which case you can use either
Which compiler are you using?
i.e. see can you find the following in it
C++ Syntax (Toggle Plain Text)
#include <comdef.h> namespace ADODB { ...
I guess it does, in which case you can use either
C++ Syntax (Toggle Plain Text)
using namespace ADODB; // or ADODB::_ConnectionPtr m_pConn;
Which compiler are you using?
![]() |
Similar Threads
- Tutorial: Understanding ASP classes (ASP)
- Crystal report setconnection and parameter problem (VB.NET)
- ADO programming (Visual Basic 4 / 5 / 6)
- MSSQL connection strings (MS SQL)
- asp connecting to database (ASP)
- Please Help!!! MOD function (ASP)
- Stored procedure call with ADO (C)
- Addnew problem (Visual Basic 4 / 5 / 6)
- ADO.NET Specified cast is not valid (ASP.NET)
Other Threads in the C++ Forum
- Previous Thread: drag and drop api
- Next Thread: help with - Read csv into vector and display elements of vector.
| Thread Tools | Search this Thread |
api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting string strings temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





