Hi Joey,
In order for this to work you need a few things:
- Ensure you are using CONNX 12 or above.
- Make sure your linked server has the RPC & RPC Out option enabled.
Here are some examples of how to issue select and update statements with a link server configured as described above:
These examples are based on a CDD built against the adabas sample employees table - the catalog name of the CDD is called adalocal. The name of the linked server is called adawin.
– Select using 4 part name ( can be slow depending on the criteria used)
– limited to SQL server syntax
select * from adawin.adalocal.connx75.employees where personnel_id = ‘50003800’
– Example of using CONNX specific grammar via OpenQuery
– SQL gets passed directly to the CONNX SQL Engine
select * from openquery(adawin, ‘select * from employees where personnel_id = ‘‘123’’ {statistics}’)
– Regular select
select * from openquery(adawin, ‘select * from employees where personnel_id = ‘‘50003800’’’)
– Update statement sending SQL directly through to CONNX SQL Engine
exec (‘update employees set middle_name = ‘‘ABC’’ where personnel_id = ‘‘50003800’’’) at adawin