|
Hi! After some new experimentations, I believe I found the answer. I misunderstood the use of SQLN when I do my first call of DESCRIBE TABLE. I setted this variable to 720, so I limited the number of elements of SQL_VAR to 720... I tried to set SQLN to more than 720... Everything works fine. So, if I don't want to be worried about that any more, all I have to do is to set SQLN to 8000 - that's the maximum number of fields a SQL statement can handle. Charles "Carel Teijgeler" <coteijgeler@xxxxxxxxx> a écrit dans le message de news:200506301907460400.002367B5@xxxxxxxxxxxxxxxxx > Charles, > > It seems no one knows the correct answer. Have you searched the Web? I cannot find a real answer for that either. > According to the Appendix A an SQL table can have either 500 or 1024 fields maximum. I assume that would be the maximum number for the DESCRIBE function as well. > > Perhaps you can tell the list what the result set is built of. And how you use the DESCRIBE function to retrieve the number of columns in the result set. > > Regards, > Carel Teijgeler > > *********** REPLY SEPARATOR *********** > > On 30-6-05 at 7:47 Charles St-Laurent wrote: > > >I tried in a SQLRPGLE program to get the fields names of a table with the > >DESCRIBE TABLE statement. If my table has 720 fields or less, everything > >works fine. The first call retrieve the number of fields in my table and my > >second call to the statement gives me the name of each field. But when I try > >on a table with more than 720 fields, the field count of my first call > >returns an incorrect value. > > > > -- > This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list > To post a message email: RPG400-L@xxxxxxxxxxxx > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/rpg400-l > or email: RPG400-L-request@xxxxxxxxxxxx > Before posting, please take a moment to review the archives > at http://archive.midrange.com/rpg400-l. > >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.