. 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 the difference between functions getch() and getche()?

0 Answers  


Explain what are global variables and explain how do you declare them?

0 Answers  


A marketing company wishes to construct a decision table to decide how to treat clients according to three characteristics: Gender, City Dweller, and age group: A (under 30), B (between 30 and 60), C (over 60). The company has four products (W, X, Y and Z) to test market. Product W will appeal to female city dwellers. Product X will appeal to young females. Product Y will appeal to Male middle aged shoppers who do not live in cities. Product Z will appeal to all but older females.

2 Answers  


What is the c value paradox and how is it explained?

0 Answers  


wap in c to accept n number display the highest and lowest value

2 Answers  






How many keywords are there in c?

0 Answers  


how can we print  hellow world programme without using semicolon

3 Answers  


Write a program for deleting duplicate elements in an array

3 Answers   Subex,


What is static memory allocation? Explain

0 Answers  


What is time complexity c?

0 Answers  


char p="data"; printf(p);

2 Answers  


What is difference between scanf and gets?

0 Answers  


Categories