![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions You are asked to use Visual Basic to create a Human Resources application that will maintain, among other things, employee information. In designing application, you delete to encapsulate the business logic into a COM EXE named HRManager.exe. Within the user interface portion of your application, you want to create an instance of the Employee object exposed by HRManager.exe Which two code fragments will instantiate an Employee object variable? (Choose two) A. Set oEmployee = New HRManager.Employee Answer: A, B. You want to use Visual Basic to package and deploy your ActiveX control. You also want to restrict the use of your control at design time to authorized developers only. How can you do this?A. Before compiling your control, set the version Compatibility option to No Compatibility. B. Using the package and deployment Wizard, digitally sign your ActiveX control. C. Include licensing with your ActiveX control. D. Set your ActiveX control to read-only. Answer: C. You create a multi-user Visual Basic application that interacts with a database. You are using ADO and need an updatable, disconnected recordset. You need to offer users the ability to add, update, and modify records. What must you do to accomplish this? A. Set the CursorType property to adOpenStatic, and set the LockType property to adLockBatchOptimistic. B. Set the CursorType property to adOpenDynamic, and set the LockType property to adLockPessimitic. C. Set the CurcorType property to adOpenDynamic Answer: A. Your Visual Basic application uses a middle-tier business object to store inventory information in a Your Visual Basic application uses a middle-tier business object to store inventory information in a database. The middle-tier object can be created on the same computer as the calling program, or on a remote computer by using DCOM. One of the business rules implemented by this object is that the inventory for an item can never be negative. How should the object inform the user interface when this business rule is broken?A. By using the MsgBox function to show a message to the user. B. By using Answer: B. Tags : Business Rules You are using Visual Basic to debug a program that uses multiple procedures to process information. The program executes a Debug-Assert statement and places Visual Basic in break mode in a low-level utility procedure. You are not sure which procedure called this utility procedure. You want to find out the name of the calling procedure without losing the local context information. How can you do this? A. On the view menu, select Call Stack. B. On the debug menu, select Step out. C. Answer: A. Your Visual Basic application contains the following Sub procedure: Private Sub Increase Number (ByVal iNumber as Integer) Dim iCounter As Integer For iCounter = 1 To 5 iNumber= iNumber + 1 Next iCounter End Sub This subroutine is part of the code for a form named Form1. You define a watch expression on the variable iNumber so that you can examine its value. You want to see the value of iNumber only when Increase Number is executing. What should you do? A. Set the module context Answer: A. You are debugging a Visual Basic program that uses a module named basString. The module contains many functions. You suspect that there are logic errors in both the FindNextSeparator procedure and the FindNextToken procedure in this module. Each of these procedures uses a local variable named intChars. FindNextToken includes a call to FindNextSeparator. FindNextToken is called form a procedure named Process String in a basMain that is in the program. You want to use the Watch window Answer: C. You use Visual Basic to develop a COM component. You want this component to run without any user interaction. However, when you view the project Properties dialog box, you find that the Unattended Execution check box is dimmed. What must you change in your project to ensure that the Unattended Execution check box is enabled? A. Remove all form objects from your project. B. Remove all MsgBox statements from the code in your project. C. Remove all ActiveX controls from your project. Answer: A. Your Visual Basic form contains a text box used to enter phone numbers. You are writing code to validate each keystroke to make sure that only numbers are being entered. If a letter is entered, you want to display a warning dialog box and prevent the appearance of the letter in the text box. In which control event must you write this code? A. Key Press B. Validate C. Change D. Lost Focus Answer: A. You are debugging a Visual Basic desktop application that has multiple forms. You suspect a possible You are debugging a Visual Basic desktop application that has multiple forms. You suspect a possible error in a subroutine named increase Number, which is defined in Form1. The subroutine is as follows: Private sub Increase Number () Dim iCounter As Integer For iCounter = 1 To 5 iNumber = iNumber + 1 Next iCounter End Sub You define a watch expression on a global variable named iNumber. You want to see the value of iNumber at all times while the application is running in the development Answer: A.
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||