egold2005
(egold2005)
March 12, 2018, 9:04am
1
Should be something simple…I am trying to add a record to TDAMemDataTable and do ApplyUpdates. I have made sure that all the fields have assigned values. My INSERT looks like this
INSERT INTO
“DEL_DATE_ALLOCATION_POOL” (
“DEL_DATE_ALLOCATION_POOL_ID”, “HUB_ID”, “NAME”,
“ACTIVE_FLAG”, “INS_USER_ID”, “INS_DATE”,
“UPD_USER_ID”, “UPD_DATE”)
VALUES (
:DEL_DATE_ALLOCATION_POOL_ID, :HUB_ID, :NAME,
:ACTIVE_FLAG, :INS_USER_ID, :INS_DATE,
:UPD_USER_ID, :UPD_DATE)
It complains about Dynamic SQL Error code -104, Token unknown - line 1, column 15, “,”.
So it seems like some field values are not assigned, right?
BTW i tried to assign TDAVCLReconcileProvider to corresponding Remote Data Adapter but the exception is being ralised like that anyway.
EvgenyK
(Evgeny Karpov)
March 12, 2018, 9:32am
2
can you check this insert w/o DA? will it be executed w/o any error?
try to remove quotes from table/field names, will it work in this case?
egold2005
(egold2005)
March 12, 2018, 10:10am
3
Removing quotas does not help.
I can execute the INSERT like this
INSERT INTO
DEL_DATE_ALLOCATION_POOL (
DEL_DATE_ALLOCATION_POOL_ID, HUB_ID, NAME,
ACTIVE_FLAG, INS_USER_ID, INS_DATE,
UPD_USER_ID, UPD_DATE)
VALUES (
57, 1, ‘111’,
‘Y’, 0, current_timestamp,
0, current_timestamp)
I am wondering if this has something to do with generator value, even though i supply the value from client explicitly.
How do i tell which field comes out with empty value? Why assigning ReconcileProvider does not work?
EvgenyK
(Evgeny Karpov)
March 12, 2018, 10:22am
4
can you share DDL for this table, pls? you can attach it here or drop email to support@
what DAD driver and database server you are using?
ReconcileProvider allows to show dialog with failed deltas on client-side and review what is wrong. it has no effect to server-side.
egold2005
(egold2005)
March 12, 2018, 10:50am
5
This is exactly what i am trying to accomplish, no dialog is being shown and it still raises an exception.
I am sending email to support@ now.
Thank you.
egold2005
(egold2005)
March 12, 2018, 11:02am
6
I’ve got it working. The problem was with PK _ID field, which was defined in schema as AutoInc. Once i changed to Integer it started to post.
EvgenyK
(Evgeny Karpov)
March 12, 2018, 11:33am
7
usually, you shouldn’t change values of autoinc field. DAD will do all autoinc logic for you, but seems you ahve prefer to manage it manually.
it was a reason, why original insert was failed.
DAService.ReturnUpdateFailureDelta and BusinessProcessor.RaiseExceptionAtError may change default logic so server error will be returned instead of set of failed delta from server-side.