Can i do a sql query from a MS SQL Server Database

Can i do a sql query from a MS SQL Server Database


It's possible to do a query with service studio from a MS SQL server database?
How can i do it?


Hi Filipe

I'm not sure I understood your question. If not, please detail it a little bit.

I'm assuming you have Service Studio installed and access (hostname, username, password) to a given Service Center that has a Sql Server database as its back-end database server.

Inside Service Studio, you may create an eSpace with Entities. When you 1-Click Publish your eSpace, one RDBMS table will be created for each of your Entities.

To create queries you may use Simple Queries or Advanced Queries. It is advised to use Simple Queries when possible.
Say you have created an Entity, named Entity1 with Atrributes Id and Attribute1:
  • In the eSpace Tree, at the right of the screen, right click over Actions, and select "Add Action" (a new Action named Action1 will be created)
  • From the Tools Tree, at the left of the screen, drag a Query element and drop it over the line that connects the Start and End elements in the canvas.
  • Double click the element just dragged, Query1, and right click over Entities/Structues and select Entity1

You now have an Action that executes a query that will select rows from Entity1.

If you want to have a query to show some information in a web screen, you might add a Screen Preparation to a web screen and drag the query to the preparation. You have some nice tutorials that explain how:

Instead a Simple Query, you may use an Advanced Query. In this case, you must use SQL-like language (you may use the on-line help to know the specifics).

If you want, you may also use the Test Query feature for both the Simple and Advanced Query. Just press the Test button in the Query Editor (you must have already published your eSpace).

António Melo
i would like the RDBMS table to created for each entiry in my own sql server database (not in outsystems database). how do i specify that?