Click here to Skip to main content
15,915,774 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCross Network communication using Winsock2? Pin
arrya_amit19-May-05 0:39
arrya_amit19-May-05 0:39 
AnswerRe: Cross Network communication using Winsock2? Pin
ThatsAlok19-May-05 1:44
ThatsAlok19-May-05 1:44 
Generalsimple installer Pin
dave2k19-May-05 0:16
dave2k19-May-05 0:16 
GeneralRe: simple installer Pin
Jack Puppy19-May-05 0:19
Jack Puppy19-May-05 0:19 
GeneralDAO and ADO in same project Pin
MK7818-May-05 22:47
MK7818-May-05 22:47 
GeneralRe: DAO and ADO in same project Pin
RChin18-May-05 23:49
RChin18-May-05 23:49 
GeneralRe: DAO and ADO in same project Pin
MK7818-May-05 23:59
MK7818-May-05 23:59 
GeneralRe: DAO and ADO in same project Pin
RChin19-May-05 0:22
RChin19-May-05 0:22 
MK78 wrote:
msjro.tlh(48) : error C2011: 'ReplicaTypeEnum' : 'enum' type redefinition

Ahh yes, JRO!
There are a host of conflicts between the JRO, ADO and DAO that you will get when you host all of them at once. To solve this, you will need to tinker with their namespaces definition a bit.

Below is the method that I use to resovle this conflict. The code below was used in the stdafx.h file, but your problem is located in the ado2.h file. you may want to modify the file directly, or relocate the importation routine to your stdafx.h file.

<code>]
// See Microsoft Knowledge Base: Q253317 for warning messages.
#pragma warning(push)
#pragma warning(disable:4146)
<font color=green>//
// However there are conflicts when they are declared
// (imported, in the case of ADO) together.
//
// I have experimented to get declaration/import order correct for compilation.
//
// .The JRO importation must come after the ADO declaration.
// .Rename the JRO namespace to avoid conflicts.
// .To avoid conflicts, place the DAO declarations after the ADOX and ADO imports</font>
#import "C:\Program Files\Common Files\system\ado\msadox.dll"
#import "C:\Program Files\Common Files\System\ado\msado15.dll" rename ("EOF","ADOEOF")			// ADO
#import "C:\Program Files\Common Files\system\ado\msjro.dll" rename_namespace("JRODB")			// Jet Replication Objects (JRO)
#import "C:\Program Files\Common Files\System\Ole DB\oledb32.dll" rename_namespace("oledb")		// OLEDB 
//
using namespace ADODB;
#pragma warning(pop)
#include <afxdao.h>				// DAO declarations
</code>





I Dream of Absolute Zero

GeneralRe: DAO and ADO in same project Pin
MK7819-May-05 1:47
MK7819-May-05 1:47 
GeneralProblems with a dll Pin
JaVinci18-May-05 22:27
JaVinci18-May-05 22:27 
GeneralRe: Problems with a dll Pin
GDavy19-May-05 0:00
GDavy19-May-05 0:00 
GeneralRe: Problems with a dll Pin
JaVinci19-May-05 3:50
JaVinci19-May-05 3:50 
QuestionWhat is #pragma pack()? Pin
xSoptik18-May-05 21:31
xSoptik18-May-05 21:31 
AnswerRe: What is #pragma pack()? Pin
Stlan18-May-05 22:06
Stlan18-May-05 22:06 
GeneralRe: What is #pragma pack()? Pin
xSoptik19-May-05 1:14
xSoptik19-May-05 1:14 
GeneralGrid controls with sliders and spin controls Pin
surfdabbler18-May-05 21:15
surfdabbler18-May-05 21:15 
GeneralCommunication Pin
usmanmir18-May-05 20:43
usmanmir18-May-05 20:43 
GeneralRe: Communication Pin
toxcct18-May-05 20:49
toxcct18-May-05 20:49 
GeneralRe: Communication Pin
usmanmir18-May-05 21:04
usmanmir18-May-05 21:04 
GeneralRe: Communication Pin
RChin18-May-05 21:31
RChin18-May-05 21:31 
GeneralRe: Communication Pin
Joel Holdsworth19-May-05 0:54
Joel Holdsworth19-May-05 0:54 
GeneralRe: Communication Pin
jmkhael19-May-05 2:13
jmkhael19-May-05 2:13 
GeneralRe: Communication Pin
Noro Korny19-May-05 2:30
Noro Korny19-May-05 2:30 
GeneralRe: Communication Pin
Paul Watson19-May-05 1:33
sitebuilderPaul Watson19-May-05 1:33 
GeneralRe: Communication Pin
ThatsAlok19-May-05 1:40
ThatsAlok19-May-05 1:40 

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.