1. Si CHEN
  2. PowerServer Mobile (Obsolete)
  3. Sunday, 26 August 2018 21:13 PM UTC

Hello Everyone,

We have deployed a first mobile application with PowerBuilder Universal Edition 2017 R2. After upgrading to the last version 2017 R3, the mobile application cannot insert a new record to the database via a DataWindow Object (but update or delete works well).

 The application is redeployed and the debug mode is activated on the PowerServer. The logs file looks as following:

 ==================================================================

463:3 [18-08-26 21:39:05] [AXDispatcher (GetHeader)] Header-pt:0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0

sessionName=accelm$4FD33659E88C413E5D92A66A7DCA6A5F$192.168.1.118/accelm

463:3 [18-08-26 21:39:05] [JRouterImpl (Call)] command=DWUpdateCommandData[

463:3 [18-08-26 21:39:05]        UpdateType=0,

463:3 [18-08-26 21:39:05]        DataObjectName=d_m_customer_page1,

463:3 [18-08-26 21:39:05]        XmlContent=null,

463:3 [18-08-26 21:39:05]        HasWsConnect=0,

463:3 [18-08-26 21:39:05]        AuthenticationMode=null,

463:3 [18-08-26 21:39:05]        CilentCertificateFile=null,

463:3 [18-08-26 21:39:05]        Endpoint=null,

463:3 [18-08-26 21:39:05]        Userdomain=null,

463:3 [18-08-26 21:39:05]        Username=null,

463:3 [18-08-26 21:39:05]        Password=null,

463:3 [18-08-26 21:39:05]        ProxyServerHostName=null,

463:3 [18-08-26 21:39:05]        ProxyServerUsername=null,

463:3 [18-08-26 21:39:05]        ProxyServerHostPassword=null,

463:3 [18-08-26 21:39:05]        ProxyServerPort=0,

463:3 [18-08-26 21:39:05]        Timeout=0,

463:3 [18-08-26 21:39:05]        UseWindowsIntegratedAuthentication=False,

463:3 [18-08-26 21:39:05]        DataWindowCount=1,

463:3 [18-08-26 21:39:05]        SqlList=[[insert into "customers" ( "customer_id","site_id","custype","custitle","cusname","addr1","postalcode","city","arr_district","phone","source_id","siccode_id","isowner","datecreate","usercode","cuscategory","provider_id","std_duedays" )  values ('2801016601','2801','P','M.','AZERTY','34','75016','TEST 16','16','0123456789','P.TEST P','000X','0','2018-04-26 00:00:00.000000','AGE','F','LAMBERT',0)]],

463:3 [18-08-26 21:39:05]        SqlTypeList=[[Insert]],

463:3 [18-08-26 21:39:05]        SqlParametersCount=[[0]],

463:3 [18-08-26 21:39:05]        SqlParameterList=[[null]],

463:3 [18-08-26 21:39:05]        SelectIdentityCountList=[0],

463:3 [18-08-26 21:39:05]        IsNeedTransferCharset=False,

463:3 [18-08-26 21:39:05]        DBEncoding=null,

463:3 [18-08-26 21:39:05]        ClientEncoding=null,

463:3 [18-08-26 21:39:05]        PBTransObject=PBTransactionProperties[Name=sqlca, ConnectionCache =axlds2801,DriverID=0, AutoCommitMode=AutoCommit, CommitOnDisconnect=True, DbType=ASA7.x/8.x/9.x, ConnectionLifeTime=-1],

463:3 [18-08-26 21:39:05]        ParameterList=null,

463:3 [18-08-26 21:39:05]        SecurityKey=null,

463:3 [18-08-26 21:39:05]        IsInChainedMode=False,

463:3 [18-08-26 21:39:05]        SessionMap=null,

463:3 [18-08-26 21:39:05]        SessionChanged=False,

463:3 [18-08-26 21:39:05]        ApplicationName=accelm,

463:3 [18-08-26 21:39:05]        Flag=-62,

463:3 [18-08-26 21:39:05]             SessionId=accelm$4FD33659E88C413E5D92A66A7DCA6A5F$192.168.1.118/accelm,

463:3 [18-08-26 21:39:05]        ClientType=1,

463:3 [18-08-26 21:39:05]       ClientContext={counter=Appeon.Util.Counter, pt=[0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0], inputencoding=UTF-16LE, rStream=2010611248, testdata_session=System.Web.SessionState.HttpSessionState, appeon_clienttype=ios, server_flag=[20, 4, 3, 18], encoding=UTF-8, protocolMode=bin, rUser=, rIP=192.168.1.114, return_pt=[0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1]},

463:3 [18-08-26 21:39:05]        CommandDataId=null,

463:3 [18-08-26 21:39:05]        LogId=null,

463:3 [18-08-26 21:39:05]        IsNeedSession=True,

463:3 [18-08-26 21:39:05]        IsAsynchronous=False,

463:3 [18-08-26 21:39:05]        List=null,

463:3 [18-08-26 21:39:05]        PBVersion=17.0]

463:3 [18-08-26 21:39:05]        sql amount=1

463:3 [18-08-26 21:39:05]        insert into "customers" ( "customer_id","site_id","custype","custitle","cusname","addr1","postalcode","city","arr_district","phone","source_id","siccode_id","isowner","datecreate","usercode","cuscategory","provider_id","std_duedays" )  values ('2801016601','2801','P','M.','AZERTY','34','75016','TEST 16','16','0123456789','P.TEST P','000X','0','2018-04-26 00:00:00.000000','AGE','F','LAMBERT',0),parameterList=]

463:3 [18-08-26 21:39:05] [Sessions (GetSession)] sessionName=accelm$4FD33659E88C413E5D92A66A7DCA6A5F$192.168.1.118/accelm

463:1 [18-08-26 21:39:05] [ProcessManagerForPB (getProductEditType)] getProductEditType begin

463:1 [18-08-26 21:39:05] [PBLicenseFacade (GetLicenseInfo)] input para: productType:3pVersion:9.0

463:1 [18-08-26 21:39:05] [PBLicenseFacade (GetLicenseInfo)] result:100

463:1 [18-08-26 21:39:05] [PBLicenseFacade (GetLicenseInfo)] iRealBytesOfResult:627

463:1 [18-08-26 21:39:05] [PBLicenseFacade (GetLicenseInfo)] pBufferOfResult:

463:1 [18-08-26 21:39:05] [PBLicenseFacade (GetLicenseInfo)] pBufferOfLicenseInfo:{

463:1 [18-08-26 21:39:05]        "UserLoginInfo" : {

463:1 [18-08-26 21:39:05]                   "UserAccount" : "xxxxxx",

463:1 [18-08-26 21:39:05]                   "Password" : "xxxxxx"

463:1 [18-08-26 21:39:05]        },

463:1 [18-08-26 21:39:05]        "UserActivateInfo" : {

463:1 [18-08-26 21:39:05]                   "UserAccount" : "",

463:1 [18-08-26 21:39:05]                   "Password" : ""

463:1 [18-08-26 21:39:05]        },

463:1 [18-08-26 21:39:05]        "RemindCycle" : 5,

463:1 [18-08-26 21:39:05]        "LicenseType" : "CloudLicense",

463:1 [18-08-26 21:39:05]        "CloudLicense" : {

463:1 [18-08-26 21:39:05]                   "LogActivateType" : 1,

463:1 [18-08-26 21:39:05]                   "Login" : {

463:1 [18-08-26 21:39:05]                               "LicenseVerType" : 2,

463:1 [18-08-26 21:39:05]                               "ProductType" : 3,

463:1 [18-08-26 21:39:05]                               "LoginState" : 1,

463:1 [18-08-26 21:39:05]                               "LicenseExpireTime" : 1561953599,

463:1 [18-08-26 21:39:05]                               "LicenseExpireTimeDisplay" : 1561953599,

463:1 [18-08-26 21:39:05]                               "LicenseRemainDays" : 309,

463:1 [18-08-26 21:39:05]                               "CurrentLoginTime" : 1535305010,

463:1 [18-08-26 21:39:05]                               "Language" : "en",

463:1 [18-08-26 21:39:05]                               "ProductVersion" : "9.0",

463:1 [18-08-26 21:39:05]                               "UserAccount" : "xxxxxxx",

463:1 [18-08-26 21:39:05]                               "ProductEditType" : "Developer"

463:1 [18-08-26 21:39:05]                   }

463:1 [18-08-26 21:39:05]        }

463:1 [18-08-26 21:39:05] }

463:1 [18-08-26 21:39:05] [ProcessManagerForPB (getProductEditType )] productEditType:Developer

463:3 [18-08-26 21:39:05] [JRouterImpl (Call-Before execute)] Execute command.execute()

463:3 [18-08-26 21:39:05] [Sessions (GetSession)] sessionName=accelm$4FD33659E88C413E5D92A66A7DCA6A5F$192.168.1.118/accelm

463:3 [18-08-26 21:39:05] [Sessions (getSessionNoUpdateTime)] sessionName1=accelm$4FD33659E88C413E5D92A66A7DCA6A5F$192.168.1.118/accelm

509:3 [18-08-26 21:39:05] [DWUpdateCommand (execute DataWindow update sql successfully)] sql = insert into "customers" ( "customer_id","site_id","custype","custitle","cusname","addr1","postalcode","city","arr_district","phone","source_id","siccode_id","isowner","datecreate","usercode","cuscategory","provider_id","std_duedays" )  values ('2801016601','2801','P','M.','AZERTY','34','75016','TEST 16','16','0123456789','P.TEST P','000X','0','2018-04-26 00:00:00.000000','AGE','F','LAMBERT',0)

509:3 [18-08-26 21:39:05] [Sessions (getSessionNoUpdateTime)] sessionName1=accelm$4FD33659E88C413E5D92A66A7DCA6A5F$192.168.1.118/accelm

509:3 [18-08-26 21:39:05] [JRouterImpl (execute - Before validateTransactionAfterExecute)] ReturnObject [ Code=0, Message=success, Exception=, ReturnValue= ]

509:3 [18-08-26 21:39:05] [Sessions (GetSession)] sessionName=accelm$4FD33659E88C413E5D92A66A7DCA6A5F$192.168.1.118/accelm

509:3 [18-08-26 21:39:05] [JRouterImpl (Call-After execute)] After execute command.execute()

509:3 [18-08-26 21:39:05] [AXDispatcher (doPost)]

509:3 [18-08-26 21:39:05] =======================INVOKE FINISHED======

509:3 [18-08-26 21:39:05] Input time < 15ms; Process and output time = 46ms; Total time = 46ms.

=============================================================

Other technical detail:

  • Database: SQL Anywhere 17
  • OS for PowerServer: Windows 10 or Windows Server 2016
  • OS for Mobile platform : Android

We would appreciate all your advices and experiences on this issue.

Si CHEN Accepted Answer Pending Moderation
  1. Sunday, 2 September 2018 21:25 PM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1

Hello Everyone,

After analyzing the logs of PowerServer and SQL Anywhere, I have fund that the new record was inserted in the database, but with a wrong date (as in the following log: datecreate = today() was 2018-04-26 in the place of 2018-08-26). So I cannot display it in our list of "Today's customers".

=================================================================

463:3 [18-08-26 21:39:05]        DataWindowCount=1,

463:3 [18-08-26 21:39:05] SqlList=[[insert into "customers" ( "customer_id","site_id","custype","custitle","cusname","addr1","postalcode","city","arr_district","phone","source_id","siccode_id","isowner","datecreate","usercode","cuscategory","provider_id","std_duedays" )  values ('2801016601','2801','P','M.','AZERTY','34','75016','TEST 16','16','0123456789','P.TEST P','000X','0','2018-04-26 00:00:00.000000','AGE','F','LAMBERT',0)]],

463:3 [18-08-26 21:39:05]        SqlTypeList=[[Insert]],

 =================================================================

If I change the system language of the mobile phone to English-US and modify all datetime formats in the datawindow objects to "yyyy-mm-dd hh:mm", all the operations work correctly.

Quick conclusion: AWS Build 1858.00 (or PowerServer 2017 R3) for the Android phone could not work correctly with the Datawindow objects if the mobile system language was French with datetime format "dd/mm/yyyy hh:mm".

Thank you ZhaoKai, I will report it to Appeon technical support team at https://www.appeon.com/standardsupport/.

Thanks to Alfredo Aldama, I use his idea to check the INSERT values after COMMIT and to rectify the inserted dates with a script.

Regards,

Si CHEN

Comment
There are no comments made yet.
Alfredo Aldama Accepted Answer Pending Moderation
  1. Tuesday, 28 August 2018 04:10 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 2

 

Hi,

Make a query after dw_update() to check if the insert was executed ok. May be this helps to determine if fail the insert or the commit

 

dw_x.Update() --table_1

Select  x into my_var from table_1 

my_var must be value if insert is OK

since both instructions are within the same transaction

Regards !

 

 

 

 

 

 

 

 

 

 

 

Comment
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 28 August 2018 00:16 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 3

Hi Chen,

Please create a simple PB case to see if it is work well. 

kindly please report it via our support ticketing system to ensure it is being properly received and tracked by our tech support at:  https://www.appeon.com/standardsupport/

Regards,
ZhaoKai

Comment
There are no comments made yet.
Si CHEN Accepted Answer Pending Moderation
  1. Monday, 27 August 2018 09:10 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 4

Hi ZhaoKai,

Thank you again for your advices.

Appeon Mobile application is based on 3-tiers architecture. PowerServer is new for me. I fund the new record creation in the DWO is OK but the insert operation in the database has to be done by the PowerServer. Please try to analyze the PowerServer log provided in my first question.

I do not understand all the PowerServer logs. I have tried to re-install old versions of PB Universal or PowerServer, and I have got some logs like:

316:1 [18-08-25 12:46:19] [PBLicenseFacade (GetLicenseInfo)] pBufferOfLicenseInfo:{

316:1 [18-08-25 12:46:19]        "UserLoginInfo" : {

316:1 [18-08-25 12:46:19]                   "UserAccount" : "xx",

316:1 [18-08-25 12:46:19]                   "Password" : "xxx"

316:1 [18-08-25 12:46:19]        },

316:1 [18-08-25 12:46:19]        "UserActivateInfo" : {

316:1 [18-08-25 12:46:19]                   "UserAccount" : "",

316:1 [18-08-25 12:46:19]                   "Password" : ""

316:1 [18-08-25 12:46:19]        },

316:1 [18-08-25 12:46:19]        "RemindCycle" : -1,

316:1 [18-08-25 12:46:19]        "LicenseType" : "CloudLicense",

What does it mean ""RemindCycle" : -1" ?

Sometime I have got:

567:3 [18-08-25 12:48:12]     SessionId=1250025245111

In the place of:

463:3 [18-08-26 21:39:05] SessionId=accelm$4FD33659E88C413E5D92A66A7DCA6A5F$192.168.1.118/accelm,

What is the difference?

You can give me some ideas to force PowerServer to insert data in the database, etc.

Regards,

Si CHEN

 

Comment
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Monday, 27 August 2018 08:31 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 5

Hi Chen,

I find that your had set sqlca.autocommit=true, anyway, I did not reproduce the issue with sqlca.autocommit=true.

Please create a simple PB case to see if it is work well.

Regards,
ZhaoKai

Comment
There are no comments made yet.
Si CHEN Accepted Answer Pending Moderation
  1. Monday, 27 August 2018 07:54 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 6

Hi Chris and ZhaoKai,

Thank you for yours advices.

Before upgrading, our mobile application worked correctly for all the defined operations (insert, update, delete etc.).

As an experienced PB developer (since 1994), I have traced my PB script and fund that the DWO works correctly but not the SQL command "COMMIT Using SQLCA" in the DWO and no error alerted:

 

   if (CreateNew = 0) then   // Updates (No problem!)

      dwi_status = GetItemStatus(dw_page[1], rowno, 0, PRIMARY!)

      if (dwi_status = DataModified!) then

         if (f_m_xchk_customers(dw_page[1], dw_page[2], rowno) > 0) then

            dw_page[2].SetItem(rowno, "dateupdate", gv_today)

            dw_page[2].SetItem(rowno, "usercode", UserCode)

            ret = Update( dw_page[1] )

            if (ret = 1) then

               COMMIT Using SQLCA ;

            else

               ROLLBACK Using SQLCA ;

               Return

            end if

         else

            Return

         end if

      end if

   else                  // Inserts (DO NOT WORK without error)

      if (f_m_xchk_customers(dw_page[1], dw_page[2], rowno) > 0) then

         ret = Update( dw_page[1] )

                                      // OK for DWO: new line created, no DWO DBError

         if (ret = 1) then

            COMMIT Using SQLCA ;

                                      // Commit executed but NO data inserted in the data base, no error alerted!

 

         else

            ROLLBACK Using SQLCA ;

            Return

         end if

      else

         Return

      end if

   end if

Other technical detail for ZhaoKai:

  • Database: SQL Anywhere 17 version 17.0.7.3399
  • OS for PowerServer: Windows 10 or Windows Server 2016
  • OS for Mobile platform : Android

It is a blocking issue. We are available for providing all necessary information.

Regards,

Si CHEN

 

Comment
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Monday, 27 August 2018 05:32 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 7

Hi Chen,

I did not reproduce the issue on Anroid or Web with SQL Anywhere 17. Dose other client has same issue? Please make sure you are using latest version Appeon Workspace, and please try full deploy application.

If there is still the issue, please open a support ticket here so we can resolve it: https://www.appeon.com/standardsupport/search

And please provide information below to us for more study, thanks.

1 Detail SQL Anywhere 17 version.
2 A simple PB case and detail steps to reproduce this issue.

Regards,
ZhaoKai

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 27 August 2018 05:09 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 8

Hi Si;

  Did your DW Control or DataStore code the DBERROR event to trap any DWO SQL errors?

Regards ... Chris

Comment
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.