15
1 st secondary 1 second term - net revision Q1: Put ( ) or ( ) for the following sentence: 1. We insert elements inside (CompoBox) tool through Items property ( ) 2. ComboBox tool use to choose just one item from the list ( ) 3. VB.Net allows adding new Controls to ToolBox ( ) 4. We can use Window Media Player to view Text File ( ) 5. User can insert animated picture in ToolBox tool and view animated when run the program ( ) 6. The control tool AxWindowsMediaPlayer is one of toolbox default items ( ) 7. To use the control tool AxWindowsMediaPlayer we should first add it to toolbox ( ) 8. State maps saved in folder named Flags ( ) 9. To open Code Window press F5 button on key board ( ) 10. The return value type from the function GetDatafromExcelSheet is Data Table( ) 11. Declaration function GetDatafromExcelSheet start with word Sub ( ) 12. Functions can’t allow parameter ( ) 13. The Function GetDatafromExcelSheet have parameters FilePath and Sql ( )

1st secondary

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

1st secondary

1 second term - net revision

Q1: Put ( ) or ( ) for the following sentence:

1. We insert elements inside (CompoBox) tool through Items property ( )

2. ComboBox tool use to choose just one item from the list ( )

3. VB.Net allows adding new Controls to ToolBox ( )

4. We can use Window Media Player to view Text File ( )

5. User can insert animated picture in ToolBox tool and view animated when run the

program ( )

6. The control tool AxWindowsMediaPlayer is one of toolbox default items ( )

7. To use the control tool AxWindowsMediaPlayer we should first

add it to toolbox ( )

8. State maps saved in folder named Flags ( )

9. To open Code Window press F5 button on key board ( )

10. The return value type from the function GetDatafromExcelSheet is Data Table( )

11. Declaration function GetDatafromExcelSheet start with word Sub ( )

12. Functions can’t allow parameter ( )

13. The Function GetDatafromExcelSheet have parameters FilePath and Sql ( )

secondary st1

second term - Net revision 2

16. The returned Value from finction GetDatafromExcelSheet(FilePath As String,

sql As String) As DataTable from type string ( )

17. To open Code Window press F5 button on key board ( )

18. The return value type from the function GetDatafromExcelSheet is Data Table( )

19. Declaration function GetDatafromExcelSheet start with word Sub ( )

20. Functions can’t allow parameter ( )

21. The Function GetDatafromExcelSheet have parameters FilePath and Sql ( )

22. The returned Value from finction GetDatafromExcelSheet(FilePath As String,

sql As String) As DataTable from type string ( )

23. We use the word SUB to declare (Function) ( )

24. The CoboBox tool have 2 valiues one is visible (DisplayMember) and one

unvisible (ValueMember) ( )

25. VB.Net language not allow to change default control’s name ( )

26. SelectedIndexChanged Event Test the selected item within the control

ComboBox ( )

27. We use the Try/Catch statement to catch and handling with runtime error ( )

secondary st1

second term - Net revision 3

28. Me reserved word Me used in the code window to indicate the end of the Method

( )

29. Variable declaration start with the word Dim ( )

30. VB.Net not allow declaration Variables without assignment value ( )

31. VB.Net not allow declaration Constant without assignment value ( )

32. There is many common properties for the major controls like Item property ( )

33. To run the program in VB.Net press F4 ( )

34. To add button to the program interface we click twice on it from ToolBox ( )

Q2:Compleet using words between bracts

(Function – 2 – Dim – FilePath – Methods - Events)

1. Function GetDatafromExcelSheet have ……… parameter

2. Parameter ………… in the function GetDatafromExcelSheet is the Excel file physical

Location

3. Declaration function GetDatafromExcelSheet statrt by the word ………

4. To declare variables MyConnection and MyCommand using ………

5. In the code window te menu Class Name show ……… but Name Method show

………

secondary st1

second term - Net revision 4

Q3: Choose the correct answer

1. The connection between VB.Net and Data Base

(DataAdapter – Command – Connection)

2. To open code window in VB.Net we press the key

(Name – F7 - Provider)

3. To change the name of lable1 tool we use the property

(Name – Text - Provider)

4. To change the text on the Button1 tool we use the property

(Name – Text - Provider)

secondary st1

second term - Net revision 5

Q4: From the code below find: (Important)

Function Name …………………….

Parameters Name ……… &………

Parameter Type ………

The return value data type ………

……… contain the Excel file path on the storage media

……… contain The Command which deal with data in the Excel file

We use the command Dim to declare the variables

We declare the functions

a. Variable ……… to open connection with data file

b. Variable ……… run the query to collect the data

c. Variable ……… convert data from Excel file to dt

d. Variable ……… has a table to store data from Excel file

Function GetDataFromExcelSheet(ByVal FilePath As String, ByVal sql

As String) As DataTable

Dim MyConnection As New OleDb.OleDbConnection

Dim MyCommand As New OleDb.OleDbCommand

Dim da As New OleDb.OleDbDataAdapter

Dim dt As New DataTable

End Function

secondary st1

second term - Net revision 6

Q5: Choose from A what is suitable in B

Q6:Complete using words between bracts

(Private Sub – Try/Catch – Me - & - Dim – New DataTable – dt –twice)

1. To open Code windows for any control tool click ……… on the tool in design mood

2. The Event in the code window start with ………

3. In the command Dim dt As New DataTable , the variable name is ……… and

its datatype is ………

4. The word ……… refer to the current form

5. We use statement ……… to prevent runtime errors

6. We use the symbol ……… to join many strings together to be one string

7. To declare variable we use the command ………

B A

A - Is one of SQL statment 1 - DataTable

B - Source of data 2 - DataSet

C - The connection between database and

visual basic

3 - Select

D - Is a class we can create variable from it in

the memory to store database

4 - Provider

E - Is a class we can create variable from it in

the memory to store database table

5 - DataSource

secondary st1

second term - Net revision 7

Q7: Read the code and chose the correct result of using it

1. Me.lblDC.Text = dt.Rows (0).Item(2).Tostring

The Text property of the lblDC assign by the value of

1- The second row and first column in the table dt

2- The first row and second column in the table dt

3- The first row and third column in the table dt (counting start from 0)

2. Me.lblWR.Text = dt.Rows (2).Item(4).Tostring

The Text property of the lblWR assign by the value of

1- The second row and fourth column in the table dt

2- The third row and fifth column in the table dt (counting start from 0)

3- The second row and fifth column in the table dt

Q8:Choose the correct answer:

1. Programming language used in the Arabic atlas project is (Visual J – Visual C –

Visual Basic .Net)

2. (SelectedIndexChanged - SelectedIndex – Index) is the default Event for

ComboBox control

3. It is prefer the name of the button control start with (frm – btm – uro)

4. It is prefer the name of the label control start with (lbl – btm – cmb)

5. To use the variable in more than Event without errors, we should declare it in the (

Class – Control – Event)

6. If statement end with (Stop Sub – End If – Final If)

7. When we use If statement, if the condition is false so the program run the code after

(Then – Else – End Sub)

8. The code V = ComboBox1.SelectedItem mean

1- Put the ComboBox selected Item name in the variable V

2- Put the value in the Variable V in the ComboBox

secondary st1

second term - Net revision 8

Q9:Arrange the steps to bring data from data base to the control

tools

( ) Transfer data to the data table in the computer memory

( ) Connect with the data base that contains the data to be collected

( ) View the data by the Controls in the form

( ) Collect data from a database stored on any storage medium

secondary st1

second term - Net revision 9

sAnswer Q1: Put () or (X) for the fowling sentences:

1. We insert elements inside (CompoBox) tool through Items property ()

2. ComboBox tool use to choose just one item from the list ()

3. VB.Net allows adding new Controls to ToolBox ()

4. We can use Window Media Player to view Text File (X)

5. User can insert animated picture in ToolBox tool and view animated when run the

program (X)

6. The control tool AxWindowsMediaPlayer is one of toolbox default items (X)

7. To use the control tool AxWindowsMediaPlayer we should first add it to toolbox

()

8. State maps saved in folder named Flags (X)

9. To open Code Window press F5 button on key board ( )

10. The return value type from the function GetDatafromExcelSheet is Data Table

( )

11. Declaration function GetDatafromExcelSheet start with word Sub ( )

12. Functions can’t allow parameter ( )

secondary st1

second term - Net revision 10

13. The Function GetDatafromExcelSheet have parameters FilePath and Sql

( )

16. The returned Value from finction GetDatafromExcelSheet(FilePath As String,

sql As String) As DataTable from type string ( )

17. To open Code Window press F5 button on key board ( )

18. The return value type from the function GetDatafromExcelSheet is Data Table

( )

19. Declaration function GetDatafromExcelSheet start with word Sub ( )

20. Functions can’t allow parameter ( )

21. The Function GetDatafromExcelSheet have parameters FilePath and Sql ( )

22. The returned Value from finction GetDatafromExcelSheet(FilePath As String,

sql As String) As DataTable from type string ( )

23. We use the word SUB to declare (Function) ()

24. The CoboBox tool have 2 valiues one is visible (DisplayMember) and one

unvisible (ValueMember) ()

25. VB.Net language not allow to change default control’s name ()

26. SelectedIndexChanged Event Test the selected item within the control

ComboBox ( )

27. We use the Try/Catch statement to catch and handling with runtime error ( )

secondary st1

second term - Net revision 11

28. Me reserved word Me used in the code window to indicate the end of the Method

( )

29. Variable declaration start with the word Dim ( )

30. VB.Net not allow declaration Variables without assignment value ( )

31. VB.Net not allow declaration Constant without assignment value ( )

32. There is many common properties for the major controls like Item property ( )

33. To run the program in VB.Net press F4 ( )

34. To add button to the program interface we click twice on it from ToolBox ( )

Q2:Complet using words between bracts:

(Function – 2 – Dim – FilePath – Methods - Events)

1. Function GetDatafromExcelSheet have 2 parameter

2. Parameter FilePath in the function GetDatafromExcelSheet is the Excel file

3. Declaration function GetDatafromExcelSheet statrt by the word Function

4. To declare variables MyConnection and MyCommand using Dim

5. In the code window te menu Class Name show Events but Name Method show

Methods

secondary st1

second term - Net revision 12

Q3: Choose the correct answer:

1. The connection between VB.Net and Data Base

(DataAdapter – Command -Connection)

2. To open code window in VB.Net we press the key

(Name – F7 - Provider)

3. To change the name of lable1 tool we use the property

(Name – Text - Provider)

4. To change the text on the Button1 tool we use the property

(Name – Text - Provider)

Q4: From the code below find: (Important)

Function Name GetDataFromExcelSheet

Parameters Name FilePath & sql

Parameter Type String

The return value data type DataTable

FilePath contain the Excel file path on the storage media

Sql contain The Command which deal with data in the Excel file

We use the command Dim to declare the variables

We declare the functions

a. Variable Myconnection to open connection with data file

b. Variable Mycommand run the query to collect the data

c. Variable da convert data from Excel file to dt

d. Variable dt has a table to store data from Excel file

Function GetDataFromExcelSheet(ByVal FilePath As String, ByVal sql

As String) As DataTable

Dim MyConnection As New OleDb.OleDbConnection

Dim MyCommand As New OleDb.OleDbCommand

Dim da As New OleDb.OleDbDataAdapter

Dim dt As New DataTable

End Function

secondary st1

second term - Net revision 13

Q5: Choose from A what is suitable in B

Answer

1 – E 2 – D 3 – A 4 – C 5 – B

B A

A - Is one of SQL statment 1 - DataTable

B - Source of data 2 - DataSet

C - The connection between database and

visual basic

3 - Select

D - Is a class we can create variable from it in

the memory to store database

4 - Provider

E - Is a class we can create variable from it in

the memory to store database table

5 - DataSource

secondary st1

second term - Net revision 14

Q6:Complete using words between bractes

(Private Sub – Try/Catch – Me - & - Dim – New DataTable – dt –twice)

1. To open Code windows for any control tool click twice on the tool in design mood

2. The Event in the code window start with Private Sub

3. In the command Dim dt As New DataTable , the variable name is dt and its

datatype is DataTable

4. The word Me refer to the current form

5. We use statement Try/Catch to prevent runtime errors

6. We use the symbol & to join many strings together to be one string

7. To declare variable we use the command Dim

Q7: Read the code and choose the correct result of using it

1. Me.lblDC.Text = dt.Rows (0).Item(2).Tostring

The Text property of the lblDC assign by the value of

1- The second row and first column in the table dt

2- The first row and second column in the table dt

3- The first row and third column in the table dt (counting start

from 0)

2. Me.lblWR.Text = dt.Rows (2).Item(4).Tostring

The Text property of the lblWR assign by the value of

1- The second row and fourth column in the table dt

2- The theird row and fifth column in the table dt (counting start

from 0)

3- The second row and fifth column in the table dt

secondary st1

second term - Net revision 15

Q8:Choose the correct answer: 1. Programming language used in the Arabic atlas project is (Visual J – Visual C –

Visual Basic .Net

2. (SelectedIndexChanged - SelectedIndex – Index) is the default Event for

ComboBox control

3. It is prefer the name of the button control start with (frm – btm – uro)

4. It is prefer the name of the label control start with (lbl – btm – cmb)

5. To use the variable in more than Event without errors, we should declare it in the (

Class – Control – Event)

6. If statement end with (Stop Sub – End If – Final If)

7. When we use If statement, if the condition is false so the program run the code after

(Then – Else – End Sub)

8. The code V = ComboBox1.SelectedItem mean

9. Arrange the steps to bring data from data base to the control

tools

(3) Transfer data to the data table in the computer memory

( 1 ) Connect with the data base that contains the data to be collected

( 4 ) View the data by the Controls in the form

( 2 ) Collect data from a database stored on any storage medium