Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Displaying SQL results in a Selection List
JOHN_LE_(LockMarUser3_(Delete)_2316094)
I'm trying to create a selection list based on a SQL query. The query works fine, but the results returned look like:R<'OWNER'='Joe Beets'> instead of just Joe Beets. Anyone know how I can correct this?The basic code looks like: ;String stmt ;stmt="select owner from doc_owner" ;record rec ;integer i ;RecArray external=CAPI.Exec(.PrgSession().fDbConnect.fConnection,stmt)<none> ;for i = 1 to Length(external) ;rec = external[i]`rec` ;end
Find more posts tagged with
Comments
eLink User
Message from Sean M Alderman via eLinkCAPI calls return data from a SQL function in a RecArray, where each row in the returned data is a record in the array. If you were to select more than one field to return from your query you'd have a multi-field record. Probably what you want to do is declare something like this -RecArray retValString externalreVal = CAPI.Exec(.PrgSession().fDbConnect.fConnection,stmt)external = retVal.OwnerAt 10:57 AM 02/14/2001 -0500, you (eLink Discussion: Development Discussion) wrote:>Displaying SQL results in a Selection List>Posted by LockMarUser3 on 02/14/2001 10:53 AM>>I'm trying to create a selection list based on a SQL query. The query works fine, but the results returned look like:>R<'OWNER'='Joe Beets'> instead of just Joe Beets. Anyone know how I can correct this?>The basic code looks like:> ;String stmt> ;stmt="select owner from doc_owner"> ;record rec> ;integer i> ;RecArray external=CAPI.Exec(.PrgSession().fDbConnect.fConnection,stmt)>><none>> ;for i = 1 to Length(external)> ;rec = external[i]>`rec`> ;end>>>[To reply to this thread, use your normal e-mail reply function.]>>============================================================>>Discussion: Development Discussion>
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=view>>Livelink
Server:>
https://knowledge.opentext.com/knowledge/livelink.exe-
Sean M. AldermanVCIM Senior Systems AnalystNASA Glenn Research CenterCleveland, OH 44135(216) 433-2795