on 06-17-2014 7:49 AM
Hello,
in the MainFetch we create a Insert ClientExchange Step for a object ordergroup (AuftragsGruppe).
INSERT INTO IN_AUFTRAGSGRUPPE_EX
(auftragsGruppeNummer, userID, action, tsUpdate)
VALUES
('<<object.auftragsGruppeNummer>>',
'<<user.agentryID>>',
NULL,
'<<lastUpdate>>')
But when we run the MainFetch we get a sql query error:
SQLBEException), SQLQueryError (Fetch "MainFetch" ClientExchange "InsertAuftragsGruppeEx", 3: SA_DBMS_API_Error, DB Code: -
131, DB Text:42000 [Sybase][ODBC Driver][SQL Anywhere]Syntax error near '0000' on line 7, ), query.cpp#145:SQLQuery::run
It seems that the Object have as lastUpdate Value '0000' but we do not greate the object in a gtransaction at the client. We do a initial sync and after this the next sync and nothing between. We expected that the object have as lastUpdate the create date from the initial sync. How can we get a object update or create date.
We use a SQLAnywhere Database as Backend and the Agentry Server 6.1.4.179.
Thanx,
André
Tags edited by: Michael Appleby
Hi,
Check with below query
<<local lastUpdate=<<if <<eq <<lastUpdate format="%Y">> "0000">>
"<<database.tempdate>>"
else
"<<lastUpdate>>"
>>
>>
INSERT INTO IN_AUFTRAGSGRUPPE_EX
(auftragsGruppeNummer, userID, action, tsUpdate)
VALUES
('<<object.auftragsGruppeNummer>>',
'<<user.agentryID>>',
NULL,
'<<lastUpdate>>')
It may be possible that the value may not be set when a new object instance is created on agentry client.An unset date and time in agentry has a value for the year '0000',this year is not valid and the value would be rejected by the database.The above query check weather a valid date is used else it takes database default date.
Thanks & Regards,
Sravanthi Polu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
i try this but the lastUpdate is everytime not set. And so we get everytyme the database.tempdate.
I understnading is that when i synchronise my object to the client, let us say at the time "17.06.2014 11:00:00". Then i do nothing with the object on the client. The insert Statement will get at the next sync the time "17.06.2014 11:00:00" as <<lastUpdate>>. If not everytime when i sync all my AuftragsGruppe will sync again to the client because the lastUpdate will be the tempData and this is lower then the tsUpdate in the Backend.
Thanx,
André
If the object is locally created then the lastUpdate will be blank. If you are pulling it from the system connection, the script that downloads the object make sure you have in your select the following:
<<database.getSystemTime>> as lastupdate
This will get the current database system time when the object is download the from the database.
Stephen
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.