Click here to Skip to main content
16,006,341 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
Questionnew Operator in .dll Pin
W Balboos, GHB6-Feb-07 8:33
W Balboos, GHB6-Feb-07 8:33 
QuestionConfiguration File Pin
priyank_ldce6-Feb-07 3:06
priyank_ldce6-Feb-07 3:06 
AnswerRe: Configuration File Pin
prasad_som7-Feb-07 20:26
prasad_som7-Feb-07 20:26 
Question.pdb files in release build Pin
bankai1235-Feb-07 17:56
bankai1235-Feb-07 17:56 
AnswerRe: .pdb files in release build Pin
bsaksida5-Feb-07 20:44
bsaksida5-Feb-07 20:44 
AnswerRe: .pdb files in release build Pin
Bartosz Bien6-Feb-07 4:43
Bartosz Bien6-Feb-07 4:43 
GeneralRe: .pdb files in release build Pin
bankai1236-Feb-07 12:05
bankai1236-Feb-07 12:05 
QuestionOracleDataReader undeclared identifier error Pin
Reveille5-Feb-07 14:59
Reveille5-Feb-07 14:59 
I have a function that queries an Oracle DB. For some reason I receive two errors on each statement in my __finally block. Is there something wrong with my declarations?

Errors:
error C2065: 'myReader' : undeclared identifier
error C2227: left of '->Close' must point to class/struct/union/generic type
error C2065: 'myOracleConnection' : undeclared identifier
error C2227: left of '->Close' must point to class/struct/union/generic type



My code that generates the errors:

cPacket ^queryPacket(String ^cmd, String ^con)
{
//test if the passed arguments are empty
if(con->Equals(""))
{
MessageBox::Show("Oracle Connection String Empty o.O","Error in Form1::queryPacket");
}
if(cmd->Equals(""))
{
MessageBox::Show("Oracle Command String Empty o.O","Error in Form1::queryPacket");
}

try
{
OracleConnection ^myOracleConnection = gcnew OracleConnection(con);
OracleCommand ^myOracleCommand = gcnew OracleCommand(cmd, myOracleConnection);
myOracleConnection->Open();
OracleDataReader ^myReader = myOracleCommand->ExecuteReader(CommandBehavior::CloseConnection);
myReader->Close();//I put this in here to debug. The statement doesnt throw any errors and inteliSense picks up the myReader object so I'm assuming that it works fine.
}//end try

catch (Exception ^ex)
{
MessageBox::Show(ex->Message,"Exception in class PaCCaP's function queryPacket",
MessageBoxButtons::OK, MessageBoxIcon::Exclamation);
}//end catch

__finally
{
myReader->Close(); //this is where the first 2 errors are generated
myOracleConnection->Close(); //and the second 2
}//end finally



I'm hoping this is something small that I've overlooked, possibly in my declarations?
Also, It It's not too much to ask, How do you create a 1-dimensional array of objects in the 2005 syntax (I just switched over from 2003 and trackable ^ pointers are a bit fuzzy to me.

All suggestions are appreciated.
Thanks!
AnswerRe: OracleDataReader undeclared identifier error Pin
User 5838525-Feb-07 15:41
User 5838525-Feb-07 15:41 
AnswerRe: OracleDataReader undeclared identifier error Pin
User 5838525-Feb-07 15:45
User 5838525-Feb-07 15:45 
GeneralRe: OracleDataReader undeclared identifier error Pin
Reveille7-Feb-07 9:03
Reveille7-Feb-07 9:03 
Question[Message Deleted] Pin
Petra5-Feb-07 11:55
Petra5-Feb-07 11:55 
AnswerRe: how to get a location of a character Pin
User 5838525-Feb-07 12:13
User 5838525-Feb-07 12:13 
GeneralRe: how to get a location of a character Pin
Mark Salsbery5-Feb-07 12:21
Mark Salsbery5-Feb-07 12:21 
AnswerRe: how to get a location of a character [modified] Pin
Mark Salsbery5-Feb-07 12:20
Mark Salsbery5-Feb-07 12:20 
AnswerRe: how to get a location of a character Pin
Christian Graus5-Feb-07 12:28
protectorChristian Graus5-Feb-07 12:28 
GeneralRe: how to get a location of a character Pin
Nish Nishant5-Feb-07 13:01
sitebuilderNish Nishant5-Feb-07 13:01 
GeneralRe: how to get a location of a character Pin
Bartosz Bien6-Feb-07 4:49
Bartosz Bien6-Feb-07 4:49 
QuestionControl Designers Pin
Tojiro5-Feb-07 5:41
Tojiro5-Feb-07 5:41 
AnswerRe: Control Designers Pin
Nish Nishant5-Feb-07 9:03
sitebuilderNish Nishant5-Feb-07 9:03 
GeneralRe: Control Designers Pin
Tojiro5-Feb-07 11:14
Tojiro5-Feb-07 11:14 
Questionmanaged app -> using Inherited unmanaged classes Pin
adrianuswiedewanus5-Feb-07 5:05
adrianuswiedewanus5-Feb-07 5:05 
AnswerRe: managed app -> using Inherited unmanaged classes Pin
Nish Nishant5-Feb-07 9:01
sitebuilderNish Nishant5-Feb-07 9:01 
Questionfile manipulation in c Pin
deeps_cute4-Feb-07 15:22
deeps_cute4-Feb-07 15:22 
AnswerRe: file manipulation in c Pin
Christian Graus4-Feb-07 15:53
protectorChristian Graus4-Feb-07 15:53 

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.