The SQL engine has no knowledge of, nor compatibility with, object columns. In fact, it completely blows up if you try to access an object field through SQL. It's almost as if the SQL engine is a bolted-on afterthought to 4D that doesn't receive much love at all from the development team.
It's a real pain if you deal with external systems that may need call a SELECT * against a table in your 4D Server and you've happened to add an object field. In this example, I added an object field named 'Extra' to an Invoices table. If I try to SELECT * FROM Invoices WHERE InvoiceID=x, I get the following stream of garbage in a runtime error (it would be so much better if they would just ignore it if they can't deal with it properly): Error when executing the method "SQLQuery.RunQuery" at line number 281 The functionality is not implemented. Error code: 1203 The functionality is not implemented. component: 'SQLS' task -13, name: 'SQLQuery' Error code: 1203 The functionality is not implemented. component: 'SQLS' task -13, name: 'SQLQuery' Error code: 1726 Failed to validate SELECT command. component: 'SQLS' task 9336, name: 'SQL connection handler' Error code: 1704 Failed to validate SELECT list. component: 'SQLS' task 9336, name: 'SQL connection handler' Error code: 1716 Failed to validate SELECT item 154. component: 'SQLS' task 9336, name: 'SQL connection handler' Error code: 1717 Failed to validate column 'Extra'. component: 'SQLS' task 9336, name: 'SQL connection handler' Error code: 1203 The functionality is not implemented. component: 'SQLS' task 9336, name: 'SQL connection handler' Jeff -- Jeffrey Kain [email protected] > On Apr 13, 2017, at 4:14 PM, Tim Nevels via 4D_Tech <[email protected]> > wrote: > > How do you create an Object field with SQL code. What do you use for the > field type? > > Begin SQL > ALTER TABLE Orders ADD OrderID UUID; > ALTER TABLE Orders ADD ObjectField ????; > End SQL ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

