Absolutely not my day with Javascript

Dan Ridinger dlr at futurechalk.com
Sat Dec 14 13:40:59 EST 2013


I don't see any creation of a statement object.

On 2013-12-11, at 2:22 AM, Bob Fiering <bob at maxolution.nl> wrote:

> Hope someone can tell me where i go wrong because i can't get my statements to work under javascript.
> 
> 
> In my startup task i do a logon for the database and call my object for the postgresql login
> i prepare some fields etc. and log into my postgresql database
> 
> Do tvSessionObj.$logon(iHostName;iUserName;iPassword;iSessionName) Returns #F
> 
> after doing some stuff with character set and transaction mode i create a session pool
> 
> Do $root.$extobjects.PGSQLDAM.$objects.PGSQLSESS.$makepool('SessPool';4;iHostName;iUserName;iPassword) Returns #F    
> i do a check if this succeeds,(which it does) and assign a size.
> 
> Do $root.$sessionpools.SessPool.$poolsize.$assign(10) Returns %flag
> Set reference lvPoolRef to $root.$sessionpools.SessPool
> 
> So far so good. I have a connection and a pool.
> 
> In the construct of my remote task i make a new session in the pool
> 
> If $sessionpools.SessPool.$poolsize<=$sessionpools.SessPool.$inuse
> Do $sessionpools.SessPool.$poolsize.$assign($sessionpools.SessPool.$poolsize+1)     ;; enlarge the session pool
> End If
> Do $root.$sessionpools.SessPool.$new('SessPool') Returns $ctask.tvSessionObj     ;; gets a session from the session pool into the task var
> 
> In my form i want to build a simple list....
> 
> Calculate iWhereClause as con("WHERE medewerker.mdw_achternaam LIKE '";pLetter_Hoofd;"%' OR medewerker.mdw_achternaam LIKE '";pLetter_Klein;"%' AND medewerker.mdw_actief = 1 AND medewerker.mdw_intratoon = 1")
> 
> Do iList_Main.$define()
> Sta: SELECT medewerker.mdw_index, medewerker.mdw_volnaam, medewerker.mdw_achternaam, medewerker.mdw_dienst_in, medewerker.mdw_dienst_uit, medewerker.mdw_actief, medewerker.mdw_telefoon, medewerker.mdw_mobiel, dienstsoort.dnst_verband, afdeling.afd_afdeling, eigendom.eig_eigendom
> Sta: FROM medewerker
> Sta: LEFT OUTER JOIN dienstsoort
> Sta: ON medewerker.mdw_dienstverband_idx = dienstsoort.dnst_index
> Sta: LEFT OUTER JOIN afdeling
> Sta: ON medewerker.mdw_afdeling_idx = afdeling.afd_index
> Sta: LEFT OUTER JOIN eigendom
> Sta: ON medewerker.mdw_bedrijf_idx = eigendom.eig_index
> Sta: [iWhereClause]
> End statement
> ;  
> Do $ctask.tvSessionObj.$prepare() Returns lFetchStatus
> Do $ctask.tvSessionObj.$execute() Returns lFetchStatus
> Do $ctask.tvSessionObj.$fetch(iList_Main;kFetchAll;kFalse) Returns lFetchStatus
> 
> even tried  $execdirect instead of the combination $prepare   $execute
> 
> When looking at the properties of tvSessionObj it gives me all the info about the connecion.
> But i get errors on the notation and no list.
> 
> What stupid mistake is not getting to me?
> 
> Bob_____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com

Dan Ridinger
Managing Director




FutureChalk Software Inc.					
20521 92A Avenue						
Langley, BC  V1M 1B7
					
Phone No: 604.723.6837
EMail: dlr at futurechalk.com
www: www.futurechalk.com




More information about the omnisdev-en mailing list