. 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.
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 |
what is a far pointer
12 Answers ABB, DRDO, ITI, Maruti Suzuki, Steel Plant, TCS, Toyota, Vivo Mobiles,
where are auto variables stored? What are the characteristics of an auto variable?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
Is c is a low level language?
When should you not use a type cast?
What are the application of c?
Explain what are the standard predefined macros?
what are advantages of U D F?
What is the difference between union and structure in c?
What are extern variables in c?
What is the use of pointers in C?
0 Answers Impetus, Motorola, Tavant Technologies, Virtusa,
What is the difference between c &c++?