Computer Science
Computer Science
:LESSON 9 9الدرس
.قراءة بيانات ورقة اكسل باستخدام الفيجوال بيزيك دوت نت
.Reading data from an Excel sheet using Visual Basic.net
Important terms مصطلحات هامة
: ADO (ActiveX Data Object(
( ليست مجرد أدوات عادية ولكن يمكنControl Tools) هو تقنية متقدمة يمكن استخدامها لجعل أدوات التحكم
جعلها تتعامل مع قواعد بيانات من خالل برمجيات مناسبة وعمل مشاريع وتطبيقات تتعامل مع قواعد البيانات
(Windows Applications – Web Application) .المتعددة
It is an advanced technology that can be used to design "Controls" not as ordinary
tools; but "Controls" that get access to databases over appropriate applications and
develop applications and Programming Projects i.e (Windows Applications and Web
Application) that manipulate data from a diversity of databases.
( التي تتعامل مع مصادر البيانات مثلClasses) عبارة عن مجموعة من التصنيفات أو االفئاتADO.NET حيث
ويعتبر. وكل هذه البرمجيات تستطيع بناء قواعد البيانات والتعامل معها، SQL server وOracle وAccess
Frameworجزء من إطار العملADO.NET
Where; ADO.NET is a set of classes that provides access to multiple data sources;
such as "Microsoft SQL Server, Microsoft Access, and Oracle ". These softwares can
create/manipulate databases; ADO.NET is a part of the Framework.
Class
والوظائف أوProperties هو المخطط الذي يتم إنشاء الكائنات منه ويحدد به العديد من العناصر مثل الخصائص
Class يتم إنشاؤه من التصنيفObject والتي يأخذها أي كائنEvents واألحداثMethods الوسائل
A (Class) is the blueprint/plan/template, from which the individual objects, are created.
It is the blueprint that describes the details which any object takes its Properties,
Methods and, Events); and are derived from the (Class).
Object
An Object is characterized by: :يتميز الكائن بأن له
.The properties that describe and specify an Object تصف الكائن وتحددهProperties خصائص
The events that occur on an Object. . يمكن أن تقع عليهEvents أحداث
. ويقصد بها ما يمكن أن يفعله الكائن عند وقوع حدث معينMethods وظائف أو وسائل
methods or actions that an object can perform; upon the occurrence of a particular event
( ويتم انشاؤه منObject Oriented) والكائن هو وحدة البناء األساسية في لغات البرمجة كائنية التوجه
Class . ليس له وجود إال بعد إنشائه من تصنيف معينObject ( حيث أن أي كائنClass). تصنيف معين
An (Object) is the basic constructive element in Object Oriented Programming; it is
created from a defined class. Thus an (Object) exists only after a certain (Class) has
been created.
) حنان عبد القادرمحمد موجه عام القاهرة/ (د3
شرح وبنك أسئله
للصف األول الثانوى الفصل الدراسي الثانى
لمادة الكمبيوتر وتكنولوجيا المعلومات
Namespace
.( التي يمكن استخدامها عند االحتياج إليهاClasses) يحتوى على مجموعة من التصنيفات
A Namespace contains a set of related classes that can be used when needed.
Framework
: الذي يُمكنك من اآلتيVisual Studio.NET هو إطار العمل لجميع تطبيقات
Is the platform for Visual Studio. NET applications that:
. مثل التطبيقات المكتبية وتطبيقات الويب.NET إنتاج العديد من تطبيقات
Enables developers to create applications like (Desktop applications , Web
applications and Mobile applications
. توفير بيئة تشغيل لهذه التطبيقات
Provides a development environment for running all applications.
Provider
.الخاص بهData provider همزة الوصل بين قاعدة البيانات والفيجوال ولكل برنامج من برامج قواعد البيانات
Provider is a link between the database and Visual basic. Each Database program has its
own Data Provider ( وهوConnection, Command and, DataAdapter)
OleDb.OleDbConnection
بغرض فتح قناة اتصال بورقة العملMyConnection ( يمكن إنشاء متغير منه وليكنClass) يعتبر تصنيف
.التي بها البيانات في ملف البيانات
It is a (Class) from where we can create a variable "MyConnection "out of this class; to
open a communication channel with the worksheet that holds data; in data file.
OleDbCommand
ويقوم هذا المتغير بتنفيذ إستعالم بموجبهMyCommand ( يمكن إنشاء متغير منه وليكنClass) يعتبر تصنيف
.يتم الحصول على البيانات من ملف البيانات
It is a Class from where we can create a variable "MyCommand" out of this class; to
execute a query and get data from data file.
OleDb.OleDbDataAdapter
(Data Adapter) ويعمل هذا المتغير كمحول للبياناتda ( يمكن إنشاء متغير منه وليكنClass) يعتبر تصنيف
. الموجود بالذاكرةdt من قاعدة البيانات لجدول البيانات لدى المتغير
It is a Class from where we can create a variable "da" out of this class; this variable
works as a converter of data (Data Adapter) from the database to the data table for the
variable dt located in the memory.
MyConnection.ConnectionString
عبارة عن خاصية تحتوي على المعلومات المطلوبة لفتح قناة اتصال
It’s a Property that contains the information required to open a communication channel
FilePat وData Source و:Provider like مثل
CommandText
SQL الذي يحتوى على تعبير نصي يمثل جملةMyCommand خاصية للمتغير
It is a Property for the variable MyCommand which contains a "String expression"
representing a SQL syntax
DataSet
في ذاكرة الكمبيوتر يمثل جداول قاعدةds والمتغيرds( يمكن إنشاء متغير منه وليكنClass) يعتبر تصنيف
.(التي تم إحضارها من ملف البيانات إلى الذاكرةData Table) البيانات
It is a Class from where we can create a variable: ds. This variable in the computer's
memory represents database tables (Data Tables), which was brought from the data file
into memory.
) حنان عبد القادرمحمد موجه عام القاهرة/ (د5
شرح وبنك أسئله
للصف األول الثانوى الفصل الدراسي الثانى
لمادة الكمبيوتر وتكنولوجيا المعلومات
DataTable
في ذاكرة الكمبيوتر يمثل جدول يحفظ بهdt والمتغيرdt ( يمكن إنشاء متغير منه وليكنClass) يعتبر تصنيف
.( التي تم إحضارها من ملف البياناتData Table) البيانات
We can create a variable out of this class: dt. This variable in the computer's memory
represents a table for saving data (Data Table), which was brought from the data file.
da.Fill (dt)
.( بالذاكرةDataTable) هي وسيلة لمأل الصفوف) السجالت (الموجودة فيFill حيث
Where Fill is a way to fill the rows (records) in (DataTable) inside the memory.
مراحل استدعاء بيانات من قاعدة بيانات مخزنة على وسيط تخزين وتحويلها إلى جدول بيانات
. ثم عرضها في الكائن المناسب على شاشة النموذج في لغة الفيجوال بيزيك دون نت،في الذاكرة
figures demonstrate the stages for retrieving data from a database saved in a storage
medium, and converting it to a data table in the memory, and then display it in the
appropriate object located on the interface window Form in Visual Basic.Net
language.
شرح عملى
من هنااااا
................... يتم وضع القيمة الحرفية الثابتة بين عالمتى ’ ‘ عند استخدام-6
When using the …………… Condition the value assigned to string constant is placed
between quotations ‘ ’.
Where .أ
When .ب
Select .ج
................... تخصيص القيمة المستخدمة لقناة اإلتصال للخاصية-7
Assign the value used for the communication channel to the property..............
DataSet .أ
ConnectionString .ب
OleDb.OleDbDataAdapter .ج
................... فتح قناة اإلتصال باستخدام الوسيلة-8
Open the communication channel using the Method ……………….
DataSet .أ
Close .ب
Open .ج
. سوف يمكن من فتح قناة اتصال بورقة العفل التي بها البيانات في ملف إكسيل............ المتغير-9
The Variable …………. that allows opening a channel of communication in the
worksheet that holds data in an Excel file
MyConnection as new OleDb.OleDbConnection .أ
MyConnection as new OleDb .ب
MyConnection as new Debatable.ج
.سوف يقوم بتنفيذ استعالم بموجه يتم الحصول على البيانات من ملف إكسيل........... المتغير-01
The Variable …will perform a `query by which you can get the data from an Excel file
إعداد
د /حنان عبدالقادر محمد
أنتظروا
باقى الدروس والمراحل االخري كمبيوترعربي -
لغاتICT