Manage External database connection in Extension

Manage External database connection in Extension

  

Hi,

My question is around connecting to an External database. One of the approach I found at the below link wherein we could defined the multiple external database connection in the Service Center and then use one of them in the Extension

http://www.outsystems.com/help/SErviceStudio/9.0/APIs/RuntimePublic_API/Use_Cases/Query_Data_from_an_External_Database.htm


But somehow this isn't working for me.

Also, how do we debug the code written in the extension? I mean like we can debug the outsystems by starting the debugger and I also put a break-point in the extension and then try to manually attach the debugger - we normally do in ASP.NET application. But it isn't working for me.

It would be huge help if someone could guide me on this and provide some reference link/code

Thanks in advance,

Karamvir Mor


Hi Karamvir,

The option to use external database connection works fine as mentioned in the url , can you please let me know what problem are you facing while using this.

For your second issue there are two options to debug your extension.

1. Create  a test project in the same extension to test it.

2. You should have visual studio in the same environment where your platform server is and then you attach w3p process using visual studio and debug your extension.

Please see this link 

How to debug a .NET Extension


Regards

-PJ-

Hi.

What is not working exactly?

Does errorlog say anything?


Hi Pramod,

Thanks for the quick response.

We are on the Cloud and doesn't have access to the Plateform Server. So, we can debug only using the Test console application, right?

I did try to run through the code in the Visual Studio by creating a TestExtension Console app.

Here is my extension code & Testing app code:



Most important how do we debug the code in the extension. I set a break-point in the extension but the break-point is not hit.


I created a TestExtension console application



But when I run it I am getting the below error message:



Thanks in advance

Karamvir Mor


Pramod Jain wrote:

Hi Karamvir,

The option to use external database connection works fine as mentioned in the url , can you please let me know what problem are you facing while using this.

For your second issue there are two options to debug your extension.

1. Create  a test project in the same extension to test it.

2. You should have visual studio in the same environment where your platform server is and then you attach w3p process using visual studio and debug your extension.

Please see this link 

How to debug a .NET Extension


Regards

-PJ-



Hi J,

Thanks for the reply:

Here is my extension code




I created a TestExtension console application



But when I run it I am getting the below error message:




Thanks,

Karamvir Mor


J. wrote:

Hi.

What is not working exactly?

Does errorlog say anything?





Hi,

Does anyone encountered such issue on the extensions? We are not able to change the Database connection and even couldn't debug it further.

Could someone help us in this?

Thanks,

Karamvir Mor