954,505 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Microsoft Visual C++/ODBC lookup

I need to do a lookup to a table in Oracle from a dll. Can anyone tell me what's wrong with this line:

pRs->Open(ptrQuery, "DSN=MY_DSN;UID=MY_ID;PWD=MY_PWD;",
adOpenForwardOnly, adOpenReadOnly, adCmdText);

The code compiles without error, but when invoked by the target application, the application errors out. (It works fine when not calling the dll.)

I can get text output past the instantiation of pRs so I don't think there's an error with getting the resultset. However, there is no text output after the Open call.

I can output ptrQuery to a text file and it looks correct.

The DSN has also been defined on the server, and the user actually has read/write access to the table -- though we want to deploy with just read access (hence use of adOpenReadOnly).

Is there something wrong with the other parameters?

Thanks.

Domino
Newbie Poster
1 post since May 2004
Reputation Points: 10
Solved Threads: 0
 

EDIT:
Oops replied in the wrong thread. Never ever thought that my search would actually give a thread from this forum posted way before & I would accidentally reply to it.

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaik/rzaikodbcapicplusplus.htm

I got this from google. Hope this is what you want.

If you are already half way in your project its up to you to start from scratch.

As I said before poly alphabetical substitution & transpositions can be effective as well.

Prabakar
Posting Whiz
342 posts since May 2008
Reputation Points: 94
Solved Threads: 33
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You