|
I changed my code to use %size, but am still getting the same error. Also, I have tried without the multi row fetch, but it is not setting my parameter value correctly as it is selecting 0 records. D SQL_Select_Stmt... D C 'Select Cust#,CName,CAdd1 from - D CustFl where Ardiv = ?' // Setup Selection Parm ArDivParm = '''RAN'''; rc = SQLBindParameter(hstmt : // Handle 1 : // Parm Number SQL_PARAM_INPUT : // Parm Type SQL_C_CHAR : // C Data Type SQL_CHAR : // SQL Data Type %Size(ArdivParm) : // Field Length 0 : // Number of Decimals pArDivParm : // Pointer to Parm %Size(ArdivParm) : // Length of Buffer for Parm strLen); // Value is Null Terminated String However, when I embed toe selection in my where clause, I get all my data. D SQL_Select_Stmt... D C 'Select Cust#,CName,CAdd1 from - D CustFl where Ardiv = ''RAN''' All suggestions are very welcome. Jeff Young ----- Original Message ---- From: Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> To: RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> Sent: Wednesday, July 19, 2006 2:25:49 PM Subject: Re: SQL CLI Help
cbRows_to_Fetch = %Len(Rows_to_Fetch);
Shouldn't this be as follows? cbRows_to_Fetch = %size(Rows_to_Fetch); %LEN is the number of digits (10), and %SIZE i the number of bytes (4). Seems to me that you want the latter, not the former!
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.