Page 1 of 1

Rowset failure

PostPosted: Wed Mar 17, 2021 7:04 pm
by ctoas
Hello friends!

After a disconnect due to inactivity or internet failure, a rowset returns the message:

Image

I have already tried to make an attempt to reconnect and this is ok, I just wish that the error message did not appear, how to do it?

Re: Rowset failure

PostPosted: Thu Mar 18, 2021 4:24 am
by nageswaragunupudi
Please try
Code: Select all  Expand view

oCn:lSilent := .t.
 


But we advise it is not desirable to suppress such messages.

If the user sees this message, he will check his internet and cables. If he does not see this message, he will not know why the program is not functioning or malfunctioning.
Even you will post that program stopped functioning and neither you know or we know why the program stopped functioning/malfunctioning because we do not know the connection is broken.

We consider this message is important.

Anyway, the final decision is yours.

Re: Rowset failure

PostPosted: Thu Mar 18, 2021 2:32 pm
by ctoas
Hello Rao

You are right, so is there any possibility of capturing the message and treating it my way?
For example how do I make the initial connection using:

Code: Select all  Expand view

    oServer := MARIA_CONNECT( cServer, cDBName, cUser, cPassword, .F. )
   
    IF oServer == NIL
        aERROR := MARIA_CONNECTERROR()
        IF aERROR[1]==2003
            MAXXPARE("Não foi possivel conectar com o servidor, verifique sua conexão" )
            MAXXWAIT( "Encerrando o sistema", , 3 )
            QUIT
        ELSE
            MAXXPARE("Erro desconhecido ao conectar com o servidor, verifique sua conexão" )
            MAXXWAIT( "Encerrando o sistema", , 3 )
            QUIT
        ENDIF
        RETURN NIL
    ENDIF