Absolutely not my day with Javascript

Bob Fiering bob at maxolution.nl
Sat Dec 14 13:49:07 EST 2013


Hi Dan,

Jim pointed me on some possible problems which i changed but still no luck.

One of the problems that are now fixed is that my SessionObject and StatementObject in Startup Task and Remote Task had the same name.
When changing this i noticed that in my syntax they were pointing to the wrong objects.

The statement object is created after a new sessionpool is created in the remote task.

But as i said. Still no luck.


Bob


Op 14 dec. 2013, om 19:40 heeft Dan Ridinger <dlr at futurechalk.com> het volgende geschreven:

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

_____________________________________________________________
Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list