Click here to Skip to main content
15,920,468 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Managed C++ to Unmanaged... Pin
Shy Agam10-Dec-06 7:42
Shy Agam10-Dec-06 7:42 
GeneralRe: Managed C++ to Unmanaged... Pin
Pierre Leclercq10-Dec-06 8:02
Pierre Leclercq10-Dec-06 8:02 
GeneralRe: Managed C++ to Unmanaged... Pin
Shy Agam10-Dec-06 8:06
Shy Agam10-Dec-06 8:06 
Question"Value Names" of registry key Pin
cshivaprasad7-Dec-06 18:34
cshivaprasad7-Dec-06 18:34 
AnswerRe: "Value Names" of registry key Pin
Christian Graus7-Dec-06 22:26
protectorChristian Graus7-Dec-06 22:26 
GeneralRe: "Value Names" of registry key Pin
cshivaprasad10-Dec-06 18:17
cshivaprasad10-Dec-06 18:17 
GeneralRe: "Value Names" of registry key Pin
Christian Graus12-Dec-06 14:30
protectorChristian Graus12-Dec-06 14:30 
QuestionProblem connecting with OleDbConnection & C++ Pin
bamagrad7-Dec-06 15:48
bamagrad7-Dec-06 15:48 
Hi
Could someone point out my code error here.

When I try to compile I get a C2065 OleDbConnection undeclared identifier
error

msg.

Here is my code:


#using <mscorlib.dll>

#using <system.data.dll>
using namespace System;
using namespace System::Data;
using namespace System::Data::OleDb;

#include "stdafx.h"


int _tmain(int argc, _TCHAR* argv[])
{

// The connection
//string cnNwind;

OleDbConnection * conn = new OleDbConnection();

conn->ConnectionString = S "Provider=Microsoft.Jet.OLEBD.4.0; "
S"Data Source=C:\my_databases\taxLots.mdb";


// The connection string

try
{
// Open Database
conn->Open();
Console::WriteLine(S"Connected to database successfully!");
}
catch (OleDbException * pe)
{
Console::Write(S"Error occurred: ");
Console::WriteLine(pe->Message);
}

// Close Connection
if (conn->State != ConnectionState::Closed)
{
conn->Close();
}
Console::WriteLine(S"The database connection is now closed");

return 0;
}

Thanks for any insights.


--
BamaGrad
AnswerRe: Problem connecting with OleDbConnection & C++ Pin
bamagrad8-Dec-06 6:30
bamagrad8-Dec-06 6:30 
QuestionHowto Return vector from a function Pin
TurboNext7-Dec-06 6:27
TurboNext7-Dec-06 6:27 
AnswerRe: Howto Return vector from a function Pin
Christian Graus7-Dec-06 8:19
protectorChristian Graus7-Dec-06 8:19 
AnswerRe: Howto Return vector from a function Pin
led mike7-Dec-06 11:50
led mike7-Dec-06 11:50 
AnswerRe: Howto Return vector from a function Pin
lafleon8-Dec-06 12:48
lafleon8-Dec-06 12:48 
GeneralRe: Howto Return vector from a function Pin
lafleon8-Dec-06 12:51
lafleon8-Dec-06 12:51 
QuestionContext sensitive keywords and mixed mode programming Pin
User 5838526-Dec-06 12:47
User 5838526-Dec-06 12:47 
GeneralRe: Context sensitive keywords and mixed mode programming Pin
George L. Jackson6-Dec-06 13:43
George L. Jackson6-Dec-06 13:43 
AnswerRe: Context sensitive keywords and mixed mode programming Pin
George L. Jackson6-Dec-06 13:51
George L. Jackson6-Dec-06 13:51 
GeneralRe: Context sensitive keywords and mixed mode programming Pin
User 5838526-Dec-06 13:57
User 5838526-Dec-06 13:57 
GeneralRe: Context sensitive keywords and mixed mode programming [modified] Pin
George L. Jackson6-Dec-06 14:28
George L. Jackson6-Dec-06 14:28 
GeneralRe: Context sensitive keywords and mixed mode programming Pin
User 5838526-Dec-06 16:37
User 5838526-Dec-06 16:37 
QuestionCopying data from unmanaged to managed Pin
kristmun6-Dec-06 3:48
kristmun6-Dec-06 3:48 
AnswerRe: Copying data from unmanaged to managed Pin
Nish Nishant6-Dec-06 4:58
sitebuilderNish Nishant6-Dec-06 4:58 
AnswerRe: Copying data from unmanaged to managed Pin
led mike6-Dec-06 6:29
led mike6-Dec-06 6:29 
GeneralRe: Copying data from unmanaged to managed Pin
kristmun8-Dec-06 4:51
kristmun8-Dec-06 4:51 
Questionstd not recognized Pin
Anil_vvs5-Dec-06 23:12
Anil_vvs5-Dec-06 23:12 

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.