Quiz for those who are multiskilled!
From: Tim (tpodonnell_at_plls.co.uk)
Date: 05/25/04
- Next message: Jimi: "Re: Is VB.NET Code Secure?"
- Previous message: amber: "scrolling through a listbox"
- Messages sorted by: [ date ] [ thread ]
Date: 25 May 2004 08:21:24 -0700
Dear Developers,
Firstly, I'm not sure where this post should go so I apologise if this
is in the wrong group or area. I'm currently interviewing for a vb.net
developer who doesn't mind prototyping the client requirements using
MS Access. We've not had much luck in finding many suitable people
through agencies and those that I have interviewed are not scoring
very high on my little test which is the reason for my post. Is my
test too difficult or are the questions just not worded very well ...
I must admit that I knocked this thing out in about half an hour
before the first chap arrived so I really don't want to change the
questions now, so that I have a good biases for comparison. It would
be nice to get some feedback on what people are scoring on this user
group.
I give each candidate around 20 min to complete it and leave the room
so there not under quite so much pressure. Please feel free to have a
go and let me know who you scored, assuming one point to each fully
complete answer and remember no cheating!!.
**These next two question assumes that you can see a database diagram
and question two has been omitted due to it's reference to this
diagram**
Question 1
The above diagram of figure 1.1 illustrates a diagram of the
organisational database system, what is meant by the term "E.R.D." in
the illustration description?
Question 3.
Assuming that this diagram is being viewed within SQL Server
Enterprise Manager, what do the * symbols indicate next to the table
names on the diagram.
Question 4.
The SQL statement detailed below is used within the above system, can
you describe what you think the developer is trying to achieve.
CREATE PROCEDURE [DBO].[SP_CURRENTUSER_DATA]
@USER_NAME CHAR(30) OUT,
AS
SET @USER_NAME = TRIM(@USER_NAME)
SELECT TBL_PERSONNEL.PK_PERSONNEL_ID,
TBL_PERSONNEL.FK_ORGANISATION_REF,
TBL_PERSONNEL.FK_MANAGER_REF,
TBL_PERSONNEL.FK_SECRETARY_REF,
TBL_PERSONNEL.FK_TITLE_REF,
TBL_PERSONNEL.FORE_NAME,
TBL_PERSONNEL.SURNAME,
TBL_PERSONNEL.DIRECT_PHONE,
TBL_PERSONNEL.MOBILE,
TBL_PERSONNEL.DIRECT_FAX,
TBL_PERSONNEL.EMAIL,
TBL_STAFF_INFO.PK_STAFF_ID,
TBL_STAFF_INFO.PASSWORD,
TBL_STAFF_INFO.PASSWORD_DATE,
TBL_STAFF_INFO.USER_NAME,
TBL_STAFF_INFO.ORGAN_ADMIN
FROM TBL_PERSONNEL,
TBL_STAFF_INFO
WHERE TBL_PERSONNEL.PK_PERSONNEL_ID = TBL_STAFF_INFO.FK_PERSONNEL_REF
AND TBL_STAFF_INFO.[USER_NAME] = @USER_NAME
GO
Question 5.
Do any errors exist within the above SQL statement?
Question 6.
Assuming that any errors are fixed what would you expect to happen if
you ran the above within MS Query Analyzer?
Question 7.
What would you add to this stored procedure to aid development within
a team environment?
Question 8.
What keyword(s) would you use when declaring a class to ensure that
you are able to catch any events that are triggered by the class after
it has been instantiated?
Question 9.
What are the two main advantages of Object Orientated Programming over
standard procedural languages?
Question 10.
Below there is a short snippet of code taken from one of our VB.NET
systems. Assuming that all external variables and classes have been
instantiated correctly, what do you think the main function of this
code is? Note: "opcAdditionalProducers" is a class that has been
written specifically for the interaction of producer information and
GetAdditionalProducerInfoStatus returns the DataRowState of a specific
row held within a local data-table within this class.
Private Sub PopulateProducerListview()
Try
Dim ProducerLimit As Integer =
CType(opcAdditionalProducers.CountAdditionalProducers, Integer)
Dim ProducerCount As Integer
Dim intIndex As Integer = 0
lstvwAdditionalProducers.Items.Clear()
Do Until ProducerCount = ProducerLimit
If opcAdditionalProducers.GetAdditionalProducerInfoStatus(intIndex)
<> DataRowState.Deleted Then
lstvwAdditionalProducers.Items.Add(opcAdditionalProducers.GetAdditionalProducerAsListViewItem(intIndex))
ProducerCount += 1
End If
intIndex += 1
Loop
If lstvwAdditionalProducers.Items.Count > 0 Then
lstvwAdditionalProducers.Items(0).Selected = True
End If
Catch excep As System.Exception
'CATCHES ALL ERRORS
MessageBox.Show("Message: " & excep.Message)
End Try
End Sub
Question 11.
Assume that the function "CountAdditionalProducers" returns the total
number of rows that do not have a DataRowState of "deleted" from the
local data-table held within the opcAdditionalProducers class.
If this function returns a value of 15 and there are 10 rows within
the data-table that are have a DataRowState of "deleted" and 2 rows at
have a DataRowState of "modified", how many times would you expect the
"do loop" to cycle?
Question 12
The code detailed below has been taken from a standard MS Access
database application. Unfortunately the code will not compile
correctly, can you highlight any area(s) where you think an error is
present. Assume cnnLocal is a global connection to the local database.
Private Sub UpdateBordereau()
Dim rst As New ADODB.command
If cnnLocal.State = adStateClosed Then Call OpenConnection
rst.Open "SELECT * " & _
"FROM TBL_BORDEREAUS " & _
"WHERE PK_BORDEREAU_ID = " & intBordereauID, cnnLocal,
adOpenKeyset, adLockOptimistic
With rst
.Fields("MONTH") = cmbMonths.ItemData(cmbMonths.ListIndex)
.Fields("SUPPLIED_DATE") = CDate(txtSuppliedDate)
.Fields("EXCEL_DATA_LOCATION") = txtExcelFileLocation
.Fields("EXCEL_ORIGINAL_LOCATION") =
txtOriginalFileLocation
.Fields("TOT_NEW_CONTRACTS") = CInt(Nz(txtNewContracts,
0))
.Fields("TOT_CANCELLATIONS") = CInt(Nz(txtCancellations,
0))
.Fields("TOT_EXCEPTIONS") = CInt(Nz(txtExceptions, 0))
.Fields("TOT_FROM_PREVIOUS_MONTH") =
CInt(Nz(txtPreviousMonth, 0))
.Fields("TOT_ENROLLED") = CInt(Nz(txtEnrolled, 0))
.Fields("TOT_RV") = CCur(Nz(txtTotalRV, 0))
.Fields("TOT_GROSS_PREMIUM") = CCur(Nz(txtGrossPremium,
0))
.Fields("TOT_BROKER_COMMISSION") =
CCur(Nz(Me.txtGrossPremium * Nz(txtCommission, 0), 0))
.Fields("TOT_NET_PREMIUM") = CCur(Nz(txtNetPremium, 0))
.UpdateTableRow
End With
rst = Nothing
cnnLocal.Close
End Sub
That's the end of the quiz so hope that it didn't take you too long!
If your interested, I'll be posting the answers in a couple of days so
that you can check your answers. If you interested in learning more
about the position then drop me a line at my email address (above) and
I'll let you know more about the position.
Kind Regards,
Tim
- Next message: Jimi: "Re: Is VB.NET Code Secure?"
- Previous message: amber: "scrolling through a listbox"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|