Jean Cruz · Sep 12, 2025 go to post

@Enrico Parisi I'm trying to make this connection in Cache 2018 following this documentation

%Library.SQLGatewayConnection - Caché & Ensemble 2018.1.4 – 2018.1.11 - including private class members

//Create new Gateway connection objectset gc=##class(%SQLGatewayConnection).%New()
   If gc=$$$NULLOREF quit $$$ERROR($$$GeneralError,"Cannot create %SQLGatewayConnection.")
     
   //Make connection to target DSNs pDSN="DSN"s usr="user"s pwd="senha"set sc=gc.Connect(pDSN,usr,pwd,0)
   If $$$ISERR(sc) quit sc
   if gc.ConnectionHandle="" quit $$$ERROR($$$GeneralError,"Connection failed")

sc="0 "_$lb($lb(6022,"DSN/User Connect",,,,,,,,$lb(,"QAAUTO6",$lb("e^zConnect+15^%Library.SQLGatewayConnection.1^2","d^zConnect+13^%Library.SQLGatewayConnection.1^2","e^zteste+8^s02.util.driver.JODBC.1^1","d^zDebugStub+30^%Debugger.System.1^1","d^^^0"))))/* ERRO #6022: Gateway: falhou DSN/User Connect. */

but does not return a connection
     

Jean Cruz · Sep 10, 2025 go to post

@Dimitri Olchanyi Is it possible to create a connection from the DSN to execute queries directly in the third-party database without using CreateLinkedTable?
 

Jean Cruz · Jul 25, 2025 go to post

@Mihoko Iijima This tip is really cool, you can also run it using SQL

select * from SYS.Database_FreeSpace() where DatabaseName = 'USER'


Jean Cruz · Nov 17, 2022 go to post

I believe it doesn't. The interfaces are used as a palliative for the lack of multiple inheritance that the COS has.

Jean Cruz · Nov 4, 2020 go to post

Thanks for the tip, it helped me a lot I just changed Read to ReadLine