marco53
asked on
#import ADO\msado15.dll compiler error
In my Visual. c++ application (.net) I am trying to manage a database with the ADO control.
In the .h file I have:
#define INITGUID
#import "c:\Program Files\Common Files\System\ADO\msado15.d ll"
rename_namespace("ADOCG") rename ("EOF","EndOfFile")
using namespace ADOCG;
#include "icrsint.h"
class CCustomRs :
public CADORecordBinding
{
public:
};
class CCustomRs :
public CADORecordBinding
{
public:
};
And when I compile the projecte (dialog based), I get these error:
....MyApp\Debug\msado15.tl h(2374) : error C2059: syntax error : '-'
....MyAppDebug\msado15.tlh (2374) : error C2238: unexpected token(s) preceding ';'
....MyApp\CustomRs.h(3) : error C2501: 'rename_namespace' : missing storage-class or type specifiers
Can help, please?
Marco53
In the .h file I have:
#define INITGUID
#import "c:\Program Files\Common Files\System\ADO\msado15.d
rename_namespace("ADOCG") rename ("EOF","EndOfFile")
using namespace ADOCG;
#include "icrsint.h"
class CCustomRs :
public CADORecordBinding
{
public:
};
class CCustomRs :
public CADORecordBinding
{
public:
};
And when I compile the projecte (dialog based), I get these error:
....MyApp\Debug\msado15.tl
....MyAppDebug\msado15.tlh
....MyApp\CustomRs.h(3) : error C2501: 'rename_namespace' : missing storage-class or type specifiers
Can help, please?
Marco53
If you are using .Net, why not use the oledb class?
ASKER
I am following a book "Visual C++ .NET " - Davis Chapman from Apogeo, and try to learning Visual C++.
What is the difference between ADO and oledb class?
Can I add and delete records from database?
Thanks
What is the difference between ADO and oledb class?
Can I add and delete records from database?
Thanks
Sure can.
If you are learning C++, have you considered C#??
In any case, i beleive all .Net languages can use the .net framework classes.. I must say i cant use C++ (bit of C# and compitent in dataAccess with VB .Net), ill see what i can do
Dave
If you are learning C++, have you considered C#??
In any case, i beleive all .Net languages can use the .net framework classes.. I must say i cant use C++ (bit of C# and compitent in dataAccess with VB .Net), ill see what i can do
Dave
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I am an Assembler programmer!! Since few months I am facing VC.NET.Its very hard to enter in this world. But I need for my job!!
Thanks for help
Thanks for help
Just google MSDN for C++ oledbCommand and you'll find your feet :)
Good Luck!
Dave
Good Luck!
Dave