Absolutely not my day with Javascript
Lars Schärer
los at computer-nach-mass.de
Wed Dec 11 05:36:20 EST 2013
hi bob
not shure if i can help:
1. i'd expect something like
Do DummyList.$sessionobject.$assign(tvSessionObj)
Do DummyList.$statementobject.$fetch(MyList,pNumber2Fetch,kTrue)
(instead of Do $ctask.tvSessionObj.$fetch(iList_Main;kFetchAll;kFalse) - there you would have to use , instaead of ; to seperate the parameters anyway)
(no need to define MyList)
2.
i'd suggest to avoid task vars
LArs
-------- Original Message --------
Subject: Absolutely not my day with Javascript (11-Dez-2013 11:22)
From: Bob Fiering <bob at maxolution.nl>
To: omnisdev-en at lists.omnis-dev.com
> 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
More information about the omnisdev-en
mailing list