Sharing Datasources with .NET

New support is added for sharing ADO.NET connections. PowerBuilder 12.5 provides the ability to share ADO.NET connections between PowerBuilder (Win32) and third-party .NET assemblies exposed in COM. A PowerBuilder native application provides the capability to import an ADO.NET connection from a third-party .NET assembly and to export an ADO.NET connection to a third-party assembly. This feature already exists in PowerBuilder.NET, but the PowerBuilder Classic IDE supports a native version of this feature using .NET COM Interop. Two methods have been added to the PowerBuilder Transaction NVO:

  • bool SetAdoConnection(oleobject connectionProxy) Imports an external ADO.NET connection.

  • oleobject GetAdoConnection() Exports an ADO.NET connection from a connected PB Transaction instance.

You can invoke these two method to get or set the proxy to share an ADO.NET DB Connection between a PB app and third-party .NET assembly.