Variable like concat variable

This is a discussion on Variable like concat variable within the C++ Programming forums, part of the General Programming Boards category; I have this code as follows Code: EXEC SQL FETCH getContractParamInfo2 INTO :db_sh_param_type,:db_sh_param_value, :db_createDate ,:db_createEndDate, :db_sncode, :db_spcode; fetchStatus2 = sqlca.sqlcode; ...

  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    13

    Variable like concat variable

    I have this code as follows

    Code:
    EXEC SQL FETCH getContractParamInfo2 INTO :db_sh_param_type,:db_sh_param_value, :db_createDate ,:db_createEndDate, :db_sncode, :db_spcode; 
    
    fetchStatus2 = sqlca.sqlcode;
    
    if(0 == fetchStatus2)
    	{
    	   ContractParameters tmpContractParam;	
    
      	   JSTRING_FROM_ORA(tmpContractParam.paramType, db_sh_param_type);
              JSTRING_FROM_ORA(tmpContractParam.paramValue, db_sh_param_value);
     if (tmpContractParam.paramValue LIKE CONCAT('%',tmpContractParam.paramType))  
    {
    do my things here
    }
            }
    The code I am trying to do is highlighted in bold and I know it is wrong.

    Is there any other way of doing it? If so, is there any code example?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    23,618
    Since you are using a non-standard library, you should provide some context as to the library in question.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about printing a variable???
    By Hoser83 in forum C++ Programming
    Replies: 2
    Last Post: 03-31-2006, 12:57 PM
  2. How accurate is the following...
    By emeyer in forum C Programming
    Replies: 22
    Last Post: 12-07-2005, 11:07 AM
  3. Use of variable
    By alice in forum C Programming
    Replies: 8
    Last Post: 06-05-2004, 07:32 AM
  4. Replies: 2
    Last Post: 04-12-2004, 01:37 AM
  5. write Variable and open Variable and get Information
    By cyberbjorn in forum C++ Programming
    Replies: 2
    Last Post: 04-09-2004, 01:30 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21