. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program to print a report which employee name and total salary for those employees whose total salary is more than 10,000. Total Salary = BASIC + HRA. At the end, the program should also print the total number of employees whose total salary is more than 10,000.



. A database table called PERSON contains the fields NAME, BASIC and HRA. Write a computer program t..

Answer / ibtu

Private Sub Form_Load()
02 rs.data source=" & App.Path & "PERSON.mdb"
03 rs.RecordSource = "select * from PERSON"

Dim CountEmp as Integer
CountEmp=0;
rs.MoveFirst
For i = 1 To rs.RecordCount ' Read all the records from database


Name = rs("NAME")
Basic = rs("BASIC")
HRA = rs("HRA")
TotalSal=Basic + Hra ‘Calculate the total salary


If TotalSal> 10000 Then
DISPLAY Name,Basic,Hra,TotalSal ‘Display employee
CountEmp=CountEmp+1  ‘Count the employees with sal >10000
End If

rs.MoveNext
Next i


DISPLAY “No of Employees”,CountEmp
End Sub

Is This Answer Correct ?    7 Yes 1 No

Post New Answer

More C Interview Questions

What is meant by recursion?

0 Answers   ADP,


Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.

0 Answers  


what is the benefit of c30

2 Answers  


Are global variables static in c?

0 Answers  


what is c language.

3 Answers  






write a program to find the number of even integers and odd integers in a given array in c language

13 Answers   IAI Cameroun, NIIT, Olive Tech, QIS,


Derive the complexity expression for AVL tree?

1 Answers  


Write a program to print a (*)pattern programming (A to Z) in capital in one programming ?

2 Answers   TCS,


Is main is a keyword in c?

0 Answers  


#define swap1(a,b) a=a+b;b=a-b;a=a-b; main() { int x=5,y=10; swap1(x,y); printf("%d %d\n",x,y); swap2(x,y); printf("%d %d\n",x,y); } int swap2(int a,int b) { int temp; temp=a; b=a; a=temp; return; } what are the outputs?

4 Answers   Ramco,


Why c is called procedure oriented language?

0 Answers  


Write a program with dynamically allocation of variable.

0 Answers   Atos Origin,


Categories