Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am converting my C++ application to 64-bit. The problem I am having has to do with Oracle calls. Any string (varchar2) parameter I pass to an Oracle procedure has a null character at the end. For example:

ProductionDB * pxDB = DBPool::pxGetDB();
pxDB->vResetParams();
pxDB->vSetProc(PROCNAME, 1);
pxDB->vSetInputParam(1, SQL_CHAR, “FIRST_NAME_SOUNDEX”);
pxDB->vExecuteProc();

In the example above, after debugging the Oracle procedure, I see that FIRST_NAME_SOUNDEX has a “\0” (NULL) character appended at the end. So, if I am trying to insert something in the database, I get a reject message that the value is too large for the column. This works with the 32-bit version of the application and 32-bit Oracle driver. Currently, I am using 64-bit version of the application (compiled in VS2010) and 64-bit Oracle driver 11.02.00.01. I have also tried the new driver 12.01.00.01, but it didn’t help.
Posted
Comments
Richard MacCutchan 12-Jun-14 11:33am    
Are you sure that the string should be in ASCII rather than Unicode?
Jörgen Andersson 15-Jun-14 15:39pm    
Well spotted.
Nick R 336 26-Jun-14 10:37am    
Richard, how do you differentiate between ASCII and Unicode in C++? And note, it worked in 32-bit version of the app with 32 bit Oracle driver. What do you think is the connection to ASCII/Unicode?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900