Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/22

Click to flip

22 Cards in this Set

  • Front
  • Back
When a user moves from Record to record, you want the text boxes on the form to Automatically display the proper record data. You return a Recordset object named RsContacts that contains three fields: Contact_ID, Company_Name, and Status. Which code fragment will dynamically bind a text box named txtContactlD to the Contact ID field ?
a) Set txtContact_ID.DataSource = rsContacts
rsContacts.DataField = Contact_ID
b) Set txtContact_ID.Linkltem = rsContacts
txtContactlD.DataMember = "Contact ID"
c) Set txtContact_ID. DataSource = rsContacts
txtContactlD.DataField = "Contact_ID"
d) Set txtContact_ID. LinkItem = rsContacts
rsContacts.DataField = rsContacts ("Contact Item")
c) Set txtContact_ID. DataSource = rsContacts
txtContactlD.DataField = "Contact_ID"
You are creating a three-tiered VB application to process student loan applications. Which two properties should a business object named student expose? (choose two)
a) the student name
b) the database server name
c) the type of control used to display loan amounts
d) the loan application date
a) the student name
d) the loan application date
The stored procedure takes a single parameter, the store number of A particular store, and returns the product sales for that store. The user can choose A store and view the sales for that store, and can repeat this operation many times to view the sales for different stores. Which ADO object should you use to execute the Sp_store_sales stored procedure?
a) Connection
b) Command
c) Recordset
d) Parameter
b) Command
You are using ADO retrieve data from a MSSQLserver database. If the connection attempt fails, you want to log the information in a text file. In which event handler should you write this custom code?
a) willexecute
b) willconnect
c) executecomplete
d) connectcomplete
d) connectcomplete
You use VB to create an in-process COM component. You include specific cleanup code that needs to execute when the component is unloaded from memory. How can you step through the unload behavior of the component?
a) Add the COM component and a test project to the same project group. Instantiate the COM component from the test project. To test the unloading behavior of the component, set the COM component equal to Nothing.
b) compile the COM component. Create a test project that uses this component. Run the test project, and then release all references to the object from the test project.
c) start the component by pressing F5. Stop the component by pressing the end button on the VB toolbar
d) start the component by pressing F5. Stop the component by executing the unload component name statement
a) Add the COM component and a test project to the same project group. Instantiate the COM component from the test project. To test the unloading behavior of the component, set the COM component equal to Nothing.
Your Visual Basic application contains the following Sub procedure.
Private Sub IncreaseNumber(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 Forml. You define a watch Expression the variable iNumber so that you can examine its value. You want to See the value of iNumber only when IncreaseNumber is executing. What should you do ?
a) Set the module context for the expression to Forml. Set the procedure context To IncreaseNumber
b) Set the module context for the expression to Forml. Set the procedure context To All Procedures.
c) Set the module context for the expression to All modules. Set the procedure context to All Procedures.
d) Set the module context for the expression to IncreaseNumber. Set the Procedure context to All Procedures.
a) Set the module context for the expression to Forml. Set the procedure context To IncreaseNumber
You are using VB to test a procedure named testl, which is located in modulel. In the add watch dialog box, you create a new watch expression and set the watch type to break when value is true. You want this watch expression to be active only when code is running in the testl procedure. Which settings should you specify for the procedure context and the module context of the watch expression?
a) set the procedure context to testl, and set the module context to all modules.
b) set the procedure context to Test1, and set the module context to Modulel
c) set the procedure context to all procedure, and set the module context to modulel
d) set the procedure context to all procedure, and set the module context to all modules
b) set the procedure context to Test1, and set the module context to Modulel
These objects should not be independently creatable in a project that does not contain your control. User must be able to retrieve particular day objects into variables in their own applications. How should you define these objects?
a) add a second project to the project group containing the activeX control project. Create a days class and a day class within this project. Set both of these classes to be publicnotcreatable.
b) add a seconde project to the project group containing the activeX control project. Create a days class and a day class within this project. Set days class to be publicnotcreatable, and set the day class to be multiuse.
c) create a days class and a day class within the activeX control project. Set both of these classes to be PublicNotCreatable.
d) create a days class and a day class within the activeX control project. Set days class to be publicnotcreatable, and set the day class to be multiuse.
c) create a days class and a day class within the activeX control project. Set both of these classes to be PublicNotCreatable.
You use VB to create a COM EXE. You compile the component by clicking make projectname from the file menu. You now want to test this additional functionality by single-stepping through the new code. How can you ensure that your test project is using the lastest version of the component?
a) Add the test project to the VB project group containing the component project. Set the test project to be the active project, and then run the test project.
b) Unregister the compiled version of the component by using regsvr32 with the /u switch, and then run your test project.
c) Load the component project into VB and run it, load the test project into a second instance of VB, and run it after the component project has fully loaded.
d) Compile the new version of the component project, and replace the previous version with the new version. Then run the test project.
c) Load the component project into VB and run it, load the test project into a second instance of VB, and run it after the component project has fully loaded.
You discover that a particular ActiveX control in the visual component manager database causes applications to crash under certain circumstances. You want to add to the visual component manager database a note warning other developers of the problem. How can you do this?
a) in visual component manager, right-click the control. Choose properties, and use the annotations tab to add your note.
b) in visual component manager, double-click the control. type your note directly under the name of the control.
c) use MS repository browser to open the visual component manager database and add your note to the annotations field
d) use notepad to compose your note and save it as a text file. Drag the text file from MS windows explorer to visual component manager
a) in visual component manager, right-click the control. Choose properties, and use the annotations tab to add your note.
You use VB to create an ActiveX control named phonecontrol that is designed for editing telephone numbers. The control includes a constituent textbox control named txtedit. You want developers who use your control to be able to set the forecolor property of this text box by setting the forecolor property of your control. Which line of code should you use to declare the forecolor property of your control?
A) public property let forecolor(byval new forecolor as long)
b) public property let forecolor(byval new_forecolor as OLEColor)
c) public property let forecolor( byval new_forecolor as txtedit. forecolor)
d) public property let forecolor( byval new forecolor as forecolor)
b) public property let forecolor(byval new_forecolor as OLEColor)
The setup is contained on a web page named adoc.htm. You want to test whether this document download properly over the Internet to a computer without VB installed. However, the only computer you have available for testing is the computer on which you developed the document. How can you test the download functionality on this computer?
a) open a command prompt, more to any folder other than the VB program folder, and type start adoc.htm
b) rename the source files for the project, and then open adoc.htm in your web browser.
c) double-click on adoc.htm in microsoft windows explorer.
d) unregister and rename all the dependencies of the document, and then open adoc.htm in your web browser.
d) unregister and rename all the dependencies of the document, and then open adoc.htm in your web browser.
You thoroughly test your component by using real-life data. You find that floating-point values are never compared for equality. To speed up calculations in your component, you want to optimize the compiled version by using at least one of the compile optimization options available from the project's advanced optimizations dialog box. Which advanced optimization setting can you use without producing undesirable results?
a) Assume no aliasing
b) Remove array bounds checks
c) Remove integer overflow checks
d) Remove floating point error checks
e) Allow Unrounded floating point operations
f) Remove safe pentium fdiv checks
f) Remove safe pentium fdiv checks
You use Visual Basic to develop a COM DLL. This component will be Called by Maria's Microsoft Visual C++ application. You want to let Maria debug her application's code in the Visual C++ IDE alongside your Visual Basic code. Which two project properties must you select to accomplish this?(Choose two)
a) Compile to P-Codeb.
b) Create Symbolic Debug Info
c) Optimize for Samll Code
d) Compile to Native Code
e) Assume No Aliasing.
b) Create Symbolic Debug Info
d) Compile to Native Code
You are debugging an application. VB is in break mode at the following line of code.
lngLocal=glngGlobal+mlngModule
Local variable lngLocal is declared in the current procedure, glngGlobal is a public variable, and module-level variable mlngModule is declared in the current module. How can you view the values of each of these variables?(choose two)
a) Display the call stack
b) open the Locals window and Expand the tree
c) execute Debug.print statements in the immediate window
d) open the watch window and expand the tree
d) open the object browser an select the application
c) execute Debug.print statements in the immediate window
d) open the watch window and expand the tree
You use VB to create a COM DLL project that contains an activeX control named carview and a class module named sales. You are debugging the interaction between the activeX control and a host container. During a debugging session, you want to examine the contents of variables that are only in carview. How can you accomplish this?
a) set the module context in the Add watch dialog box to carview
b) set the instancing property of sales to private
c) set the public property of carview to true
d) set the threading model of the project to apartment thread
a) set the module context in the Add watch dialog box to carview
You have two version of your VB application, one that support 10 users and one that support 100 users. You compile your application by using an automated build process. How should you specify the correct version for the build process?
a) set conditional compilation constants on the command line used to build the project
b) specify the correct version in the registry
c) specify the correct version in an .ini file
d) set conditional compulation constants in a .pif file for the project
a) set conditional compilation constants on the command line used to build the project
You create a VB application that uses conditional compilation to enable and disable elements of functionality. Which two mechanisms can you use to set conditional compilation constants?(choose two)
a) the dim statement
b) the const statement
c) the #Const directive
d) the Project Properties dialog box
e) the Project references dialog box
c) the #Const directive
d) the Project Properties dialog box
You are helping to convert an application from VB forms to active documents so that it can be used in web browsers on the corporate intranet. You are revising code in doccustomer, an active document created from the frmcustomer form. The current code is as follows.
private sub cmdinventory_click()
frminventory.show
end sub
The frminventory form has been converted to become the docinventory active document. Which procedure should you use to best preserver the functionality of the existing code?
a) private sub cmdinventory_click()
frminventory. show
end sub
b) private sub cmdinventory_click()
docinventory. show
end sub
c) private sub cmdinventory_click()
Hyperlink Navigate to"docinventorv. vbd"
end sub
d) private sub cmdinventory_click()
hyperlink. goforward
end sub
c) private sub cmdinventory_click()
Hyperlink Navigate to"docinventorv. vbd"
end sub
You are using Visual Basic to create a user interface component that will be used in several of your company's data analysis products. This component will display both a table of information in a grid control and a hyperlink allowing the user to access more detailed information. The component will also manage saving and loading data to a local file on the user's computer. The products are being designed so that they can display their user interfaces in a web browser. Which type of component should you create?
a) COM DLL
b) Active Document
c) Visual Basic form
d) COM EXE
b) Active Document
You use VB to create an active document project named projectl. Projectl contains a single userdocument object named userdocumentl. When you are finished debugging the document, you compile it and distribute it to users. Which two files must you distribute?(choosetwo)
a) projectl.exe
b) projectl.vbd
c) userdocumentl .doc
d) userdocumentl . dox
e) projectl.vbp
a) projectl.exe
b) projectl.vbd
Your COM DLL uses an object named row to retrieve customer information from a SQLSERVER database. For increased speed in data access, your customer object exposes a property named bookmark that can hold a recordset bookmark. An orders object exposed by your COM DLL also uses the bookmark property. You do not want the bookmark property to be visible to other applications. How should you declare the bookmark property?
a) Public property get bookmark() as variant
b) Private property get bookmark() as variant
c) Friend property get bookmark() as variant
d) Global property get bookmark() as variant
c) Friend property get bookmark() as variant