Kbase 18393: ADM2. Possible Causes of Error 1006 with SmartDataObjects
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  15/10/2008 |
|
Status: Verified
FACT(s) (Environment):
Progress 9.x
SYMPTOM(s):
ADM2
<program name> Database <dbname> not connected. (1006)
Causes for error 1006 with SmartDataObjects.
CAUSE:
This describes how error 1006 may occur in a SmartObject application that is updating database records with a SmartDataObject running on an AppServer.
SmartDataObjects inherit Data Dictionary validation by default, therefore any visual objects created with a SmartDataObject will inherit this dictionary validation. If your dictionary validation references another table then you will get an error at runtime if the client is not connected to a database. If you are distributing your application with a SmartDataObject running on an AppServer a
client database connection is not necessary.
This problem will occur if you create an application with a field in an SDO that uses another table in its dictionary validation. For example, if you create an application with the following:
SmartDataObject for customers that contains CustNum, Name and SalesRep fields. The CustNum field automatically inherits the data dictionary validation for CustNum which is custnum > 0 and the SalesRep field automatically inherits the validation for SalesRep which is CAN-FIND(Salesrep OF Customer).
SmartDataViewer that uses the SmartDataObject as its Data Source.
SmartWindow with these objects and Navigation and Update SmartPanels.
and run this application with the SmartDataObject running on an AppServer and no database connection on the client, you will receive this error:
vcustomer.w Database sports2000 not connected. (1006)
This error occurs because the rcode is bound to the sports2000 database because of the reference to the Salesrep table.
This problem can also occur if you create an application with a join in an SDO.
FIX:
The workaround for this would be to turn off the Inherit Dictionary Validation Expression toggle in the Advanced attributes for the Fields in the SmartDataObject.