# mssqlCall

## Description

Directly access or call a mssql Web Service.

## Input / Parameters

| No | Name      | Description                                                               | Data Type | Required |
| -- | --------- | ------------------------------------------------------------------------- | --------- | -------- |
| 1  | connector | Name of connector and created in the Services and Global Components page. | String    | Yes      |
| 2  | ent       | The Web Service name to be called.                                        | String    | Yes      |
| 3  | function  | The function from the Web Service to be executed.                         | String    | Yes      |
| 4  | data      | This contains the main parameter in the function being called.            | Object    | Yes      |
| 5  | filter    | Filter details to be used in retrieving the data.                         | Object    | No       |
| 6  | orFilter  | Filter details to be used in retrieving the data.                         | Object    | No       |

## Output

Coming soon.

## Callback

Coming soon.

## Video

Coming soon.

## Example

The user wants to call the mssql Web Service.

### Step

1. Create MSSQL Connector in Services and define the name, url, port, database, user, password and timeOut.\
   Name: mssql\
   url: mkals4utt4.database.windows.net port: 1433\
   database: emobiq\_demo\_1\
   user: sqladmin\
   password: \*\*\*\*\*\*\*\*\
   timeOut: 5000

   ![](/files/4Vz6fOdfjAF3gGtsLIle)
2. Create MSSQL Table in Services and define the Name, connector, listKey and serviceName timeOut.\
   Name: tbl\_1\
   mssql: mssql\
   listKey: data\
   serviceName: user\_package<br>

   ![](/files/jRcLxx9Dh3GDEK210h8j)
3. Fill in the field caption for MssqlDataset Fields and generate datalist.\
   Field Caption: 1,2,3,4,5,6<br>

   ![](/files/Ak5qK70gUYhOCKTKg3SL)

   ![](/files/Xs6XtdiwCHdUJMK3qLNZ)<br>
4. Call the function "mssqlCall"and define the connector, ent, function and set the function"toObject"to data.\
   connector: mssql\
   ent: user\_package\
   function: insert\
   data: toObject<br>

   ![](/files/91qnFHK9InmnzguSRdak)
5. Define the column and value for object. ( Please refer to the images below, we have our own database:emobiq\_demo\_1 and inside this database we have 6 column which are id(not need to create due to the id no will auto increment), icnum, name, handphone, address, package.)\
   icnum: 9\
   name: 9\
   handphone: 9\
   address: 9\
   package: 9 (auto display 1)<br>

   ![](/files/SzxQILEUXp73iaLTCkCG)

   ![](/files/EIvdrcw826rjt3kWCypy)
6. Add a console for display the response from console.<br>

   ![](/files/IOnQfZjJMdSSduoLChJI)

### Result

![](/files/HQnBRAP8bp0eaoTrRumR)

![](/files/toGR8G6JOeA1HnadcXLn)

## Links

Coming soon.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/dataset/mssqlcall.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
