R: O$ 5.1 Postgres databse logon

Franco Maregotto franco at hotelaqua.it
Tue Dec 21 04:36:55 EST 2010

Do tsk_SessObj.$port.$assign(port)
Do tsk_SessObj.$database.$assign(DBName)
Do tsk_SessObj.$hostname.$assign(HostIPaddress)
Do tsk_SessObj.$logon(HostIPaddress,UserName,Password) Returns #F
If flag true
Do tsk_SessObj.$newstatement('SomeSessName_unuseful') Returns tsk_StatemObj
End If

If you use a local Postgre DB use "localhost" as HostIPAddress

That's what I use and works fine with Postgres DB locally or remote servers
I might guess that $socket is not the right instruction..


-----Messaggio originale-----
Da: omnisdev-en-bounces at lists.omnis-dev.com [mailto:omnisdev-en-bounces at lists.omnis-dev.com] Per conto di George Panagopoulos
Inviato: lunedì 20 dicembre 2010 21.42
A: OmnisDev List - English
Oggetto: Re: O$ 5.1 Postgres databse logon

Hi Fotis,

Here is my code:

Do tSessObj.$port.$assign(iDBPort)
Do tSessObj.$socket.$assign(iDBSocket)
Do tSessObj.$database.$assign('lynx')
Do tSessObj.$logon(iDBServer,'eyeway','pan7100','LynxSess') Returns iStatus

This same code worked for MySQL but on Postres is not working.
Although I connect to the database and create the session object, I 
cannot see the database name.
Is it possible that my Postgres installation is wrong?
By the way, I am using Postgres 9.0 on Windows Vista and XP with the 
same results.

Thanks ,


Στις 20/12/2010 9:41 μμ, ο/η Fotis Georgiadis έγραψε:
> Hi George,
> You need to first assign the database, then logon the session (if you use session objects)
> Example:
> Do lvSession.$database.$assign('databaseName')
> Do lvSession.$logon('localhost';'userName';'userPassword') Returns #F
> Then you can set the statement object etc...
> HTH,
> Fotis
> On 20 Δεκ 2010, at 6:25 μ.μ., George Panagopoulos wrote:
>> Hi all,
>> I thought I give a try to postgres database and so I installed it to my test machine, migrate my MySql database to it and test it.
>> After successfully logged on to the database I thought I try a SQL statement.
>> Nothing! I searched a bit to find out what was wrong and I have found that the table in the statement needs a reference to the table.
>> So this: SELECT * FROM sidebar  doesn't work
>> This : SELECT * FROM lynx.sidebar works.
>> I presume that during the logon the $database doesn't pass the database name to the session object or I am not doing it right.
>> By consequence, $select() and $fetch() do not work either.
>> Any suggestions?
>> TIA
>> -- 
>> Kind Regards,
>> George Panagopoulos
>> Omnis Programmer
>> ByteCom
>> _____________________________________________________________
>> Manage your list subscriptions at http://lists.omnis-dev.com
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com
Manage your list subscriptions at http://lists.omnis-dev.com

More information about the omnisdev-en mailing list