Home » U++ Library support » U++ SQL » Oracle RefCursor and Stored Procedure  
	
		
		
			| Re: Oracle RefCursor and Stored Procedure [message #43009 is a reply to message #43000] | 
			Wed, 23 April 2014 08:27    | 
		 
		
			
				
				
				  | 
					
						  
						mirek
						 Messages: 14271 Registered: November 2005 
						
					 | 
					Ultimate Member  | 
					 | 
		 
		 
	 | 
 
	
		aksdb wrote on Tue, 22 April 2014 14:27Ok, one huge problem apparently are these comparisons:total_len > sizeof(buffer)  
Since total_len is an int (and therefore signed), the behaviour is rather strange. I actually would have expected the compiler to prefer the type of the left side, but apparently it doesn't. So now we (sometimes) compare -1 > 8u which will then return true (since -1 will be cast into uint). 
 
Replacing these four occurances with 
total_len > (int)sizeof(buffer)  
solves at least this particular problem. There is still some more memory corruption (since the next query fails at GetColumnInfo which, if executed alone, works fine). So I keep hunting ...    
 
Thanks! It is quite apparent, now knowing it   
 
Hopefully I will make my Oracle working this evening, so I will be able to fix remaining issues in Oci8. 
 
I apologize for problems, it really is half-forgoten piece of code. I guess most of us prefer open-source databases these days... 
 
Mirek
		
		
		
 |  
	| 
		
	 | 
 
 
 |  
  
 
	
	  | 
	 | 
	
		Oracle RefCursor and Stored Procedure
		By:  aksdb on Thu, 17 April 2014 18:59  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  mirek on Tue, 22 April 2014 08:14  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  aksdb on Tue, 22 April 2014 10:03  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  aksdb on Tue, 22 April 2014 11:26  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  mirek on Tue, 22 April 2014 14:28  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  mirek on Tue, 22 April 2014 14:31  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  aksdb on Tue, 22 April 2014 14:53  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  aksdb on Tue, 22 April 2014 16:27  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  mirek on Wed, 23 April 2014 08:27  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  mirek on Wed, 23 April 2014 08:32  
	 | 
 
	  | 
	 | 
	
		Re: Oracle RefCursor and Stored Procedure
		By:  aksdb on Wed, 23 April 2014 10:22  
	 | 
  
Goto Forum:
 
 Current Time: Tue Nov 04 14:58:16 CET 2025 
 Total time taken to generate the page: 0.04243 seconds 
 |