. 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

can u give me the good and very optimised code for a car racing game?

0 Answers  


How do you list a file’s date and time?

0 Answers  


What is difference between scanf and gets?

0 Answers  


Explain what is a stream?

0 Answers  


Explain why C language is procedural?

0 Answers   GE,






pgm in c to reverse string by word using array(god is love becomes love is god) (no additional array can used,space is only delimiter between words )

2 Answers   Persistent,


When should a type cast be used?

0 Answers  


What are multibyte characters?

0 Answers  


Is it possible to initialize a variable at the time it was declared?

0 Answers  


What is abstract data structure in c?

0 Answers  


What are the preprocessor categories?

0 Answers  


void main() { //char ch; unsigned char ch; clrscr(); for(ch =0;ch<= 127; ch++) printf(" %c= %d \t ", ch, ch); } output?

4 Answers   Groupon,


Categories