1. Oihana Goikoetxea
  2. PowerServer Mobile (Obsolete)
  3. Tuesday, 10 December 2019 09:27 AM UTC

Hi:

How can I manage the transacctions? I can't put code on the transacction object:

 

 

So, how can I manage them? The errors, desconections...

 

Thanks, 

Oihana

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 10 December 2019 19:12 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1

Hi Oihana;

   All that is managed by PowerServer. All you need to do is inform PS or a successful or unsuccessful business transaction via the standard Commit / Rollback DML commands. The SQLCA Connect is only a "logical" connection to one of PowerServer's DataSource DB Connection pools.

Regards ... Chris

Comment
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 11 December 2019 00:57 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 2

Hi Oihana,

Can you tell us how are you going to manage the transaction? Although it doesn’t support DBError, disconnect is supported. You can use transaction.SQLcode and transaction.sqlerrtext to locate the issue.

You can also use the PowerServer log and the PowerServer Error log to help locate the issue when exception or error occurs:
https://docs.appeon.com/appeon_online_help/ps2019/server_configuration_guide_for_net/Logs.html

Regards,
ZhaoKai

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 11 December 2019 12:35 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 3

I think Oihana is asking what to do with the dberror event's code, if this event isn't supported.

Comment
There are no comments made yet.
Oihana Goikoetxea Accepted Answer Pending Moderation
  1. Thursday, 12 December 2019 08:04 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 4

Hi Zaho, Crhis and Miguel:

For example, we are sincronizing the online and offline DBs and something is going wrong, but we have no way of knowing what happened.

The issue is when we synchronize large volume of data. With 7000 records there is no problem but at which we increase the number fails. And we don't have the way to know where is the problem.

For sincronize first we do retrieve the data on the oracle online DB and then we do a rowscopy and update to a SQLite DB.

ll_rows_a_sincro = lds_datos_ori.retrieve() //online transaction. Source
IF lds_datos_ori.RowsCopy(lds_datos_ori.GetRow(), lds_datos_ori.RowCount(), Primary!, lds_datos_dest, 1, Primary!) > 0 THEN


ll_ret = lds_datos_dest.update() //offline transaction. Destiny
IF ll_ret = 1 THEN


ll_rows_sincro = lds_datos_dest.rowcount()
COMMIT USING sqlca;


ELSE


f_informa_error_bd(sqlca.SQLCode, "'(OFF) Sincronizando tabla "+ as_tabla +". Error: " + sqlca.sqlerrtext)
ROLLBACK USING sqlca;

END IF

END IF

The PowerServer log doesn't give us much information or I can't find this kind of information. I attach the Error and Server logs. I thinks that the problem is on the retrieve but I'm not sure and I don't know how to fixe it.

 

Note: if I execute on my PC I can sincronize 176.000 registers without problems, and it takes 29 seconds. The problem is only on the mobile.

 

Thanks to everybody,

Oihana 

 

Attachments (2)
Comment
  1. Oihana Goikoetxea
  2. Friday, 13 December 2019 07:28 AM UTC
Hi Miquel!



And how do I know if it was an out of memory? How do I manage it?

Thanks! I will test the reset...











  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 21 January 2020 12:26 PM UTC
Sorry for the late answer: I don't know how to check the memory on Mobile but maybe using:

Appeon_workarounds.pbl, eon_mobile_device, of_getFreeMemory() ?

regards
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 21 January 2020 12:34 PM UTC
You'd have to have a way of checking the free memory while retrieving (not sure if doing that in the "retrieveRow" event, would still make the retrieve run asynchronously on Powerserver?

  1. Helpful
There are no comments made yet.
Oihana Goikoetxea Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 09:46 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 5

Hi:

We suspect that the connection to the Database is not stable the first 3-5 times the mobile application is started from the Appeon workspace.

For example, when we select an option we checked the connection, and if it is correct, a record is retrieved. The first time the result is that it does not recover anything:

In this case, as doesn't have returned any row, we check the connection, and give us OK:

 

And later the same operation is OK:

How can we controle / mange this cases?

 

Thanks in advance, 

 

Oihana

Comment
  1. Oihana Goikoetxea
  2. Tuesday, 21 January 2020 11:42 AM UTC
See de # 6 message with the log...
  1. Helpful
There are no comments made yet.
Oihana Goikoetxea Accepted Answer Pending Moderation
  1. Tuesday, 21 January 2020 11:37 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 6

 

I found the log for the same select with returned rows and no returned rows (with the same versión of code)

 

 

Comment
  1. Oihana Goikoetxea
  2. Tuesday, 21 January 2020 13:31 PM UTC
Yes is very weird ... Because I don't have way to know if is an error or really the query doens't return anything...
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 21 January 2020 18:14 PM UTC
Can you make a sample application and report it as a bug maybe?

Or simply report it as a bug if a sample application is difficult. Maybe they can still help you out.
  1. Helpful
  1. Oihana Goikoetxea
  2. Wednesday, 22 January 2020 07:19 AM UTC
Thanks Miquel!



Let's see if any expert gives us more clues...
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.