| | |
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: 979
Reputation:
Solved Threads: 209
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 |
Tag cloud for C++
api application array arrays based beginner binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph homeworkhelp iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting spoonfeeding string strings struct template templates text tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets





