# أمان SQL

## 🔗 ما هي SQL Security؟

تسمح SQL Security بتقييد وصول الاستبيان إلى صف معين من جدول موجود في SQL Server وتتيح لك إعادة استخدام البيانات من تلك الاستعلامات لأغراض piping في أي مكان في أسئلة أو إجابات الاستبيان باستخدام [data attributes](/ar/form-management/security/data-attributes.md).\
\
يمكن تهيئة كل استعلام باستخدام مُدخلات من المستجيب. يمكنك إضافة متغيرات جديدة لبناء واجهة مستخدم تتيح للمستجيب تعبئتها. ثم يمكن استخدام هذه المتغيرات في استعلامك كمعاملات SQL قياسية. <br>

![](/files/33d808edf2b6733bf9642406d4bb17dcedcc942f)\
\
\
إذا رغبت في تعبئة متغير استنادًا إلى querystring يمكنك إنشاء متغير من النوع "Hidden" وتمرير قيمة افتراضية له من querystring كما هو موضح أدناه حيث يتم تمرير معرف العميل من متغير querystring بعنوان "customerid".

![](/files/259176fbb07e6076263a7efdbe8b706a1190a7d6)

{% hint style="info" %}
إذا كانت واجهة المستخدم الخاصة بك مكوّنة باستخدام متغيرات مخفية فقط فسيقوم ngSurvey تلقائيًا باستدعاء الاستعلام بمجرد تحميل الاستبيان ولن يتم عرض أي واجهة مستخدم.
{% endhint %}

{% hint style="warning" %}
سيُمنح المستجيب حق الوصول فقط إذا أعاد الاستعلام صفًا أو إذا كان **Access only to SQL entries** الخيار معطّل.
{% endhint %}

بمجرد أن ينهي المستجيب الاستبيان ويقدّم إجاباته سيقوم ngSurvey بحفظ بيانات SQL المسترجعة جنبًا إلى جنب مع إجابات المستجيب.

## 🔅 خصائص SQL Security

* **`الاتصالات المتاحة`** الاتصال الذي سيُستخدم للاتصال بقاعدة البيانات الخاصة بك
* **`استعلام SQL`** استعلام SQL أو استدعاء إجراء مخزن سيعيد الصف وأعمدته.&#x20;
* **`السماح بإرسال متعدد`** يسمح لنفس الصف بالإرسال عدة مرات على نفس الاستبيان. &#x20;
* **`رسالة المقدمة`** ستُعرض فوق واجهة الحقول عندما يحاول المستجيبون الوصول إلى الاستبيان.
* **`رسالة المفتاح غير الصالحة`** رسالة خطأ تُعرض للمستخدم إذا لم يُرجع أي صف بناءً على القيمة المدخلة.

{% hint style="success" %}
يمكن استخدام عنصر الأمان هذا كمزوّد [key provider](/ar/form-management/security/key-provider-concepts.md).&#x20;
{% endhint %}


---

# 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.ngsurvey.com/ar/form-management/security/security-items/sql-security.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.
