• No results found

Vb Questions

N/A
N/A
Protected

Academic year: 2021

Share "Vb Questions"

Copied!
30
0
0

Loading.... (view fulltext now)

Full text

(1)

VB Questions (General) VB Questions (General)

1

1.. DDiim m xx, , y y aas s iinntteeggeerr. . WWhhaat t iis s x x aannd d y y ddaatta a ttyyppee?? X as variant and y as integer.

X as variant and y as integer. 2

2.. WWhhaat t iis s tthhe e ssiizze e oof f tthhe e vvaarriiaannt t ddaatta a ttyyppee?? The Variant data type has a numeric storage size of 16 The Variant data type has a numeric storage size of 16 bytes and can contain data up to the range of a

bytes and can contain data up to the range of a

Decimal, or a character storage size of 22 bytes (plus Decimal, or a character storage size of 22 bytes (plus string length), and can store any character text.

string length), and can store any character text.

3

3.. WWhhaat t iis s tthhe e rreettuurrn n ttyyppe e oof f IInnssttr r aannd d SSttrrccmmpp?? Instr – integer (Numeric position)

Instr – integer (Numeric position)

Strcmp - integer ( if both the string are equal they Strcmp - integer ( if both the string are equal they result = 0)

result = 0)

Strcmp (Str1, Str2, Comparetype) Strcmp (Str1, Str2, Comparetype)

Comparing mode = 0 – Binary Comparing Comparing mode = 0 – Binary Comparing 1 – Textual Comparing

1 – Textual Comparing 4.

4. WWhhat at iis s tthhe e mmaax x sisizze e aalllloowewed d ffor or MMsgsgbboox x PPrroommpt pt aandnd Input Box? Input Box? 1024 1024 5 5.. MMaax x llaabbeel l ccaappttiioon n lleennggtthh. . –– 2,048 2,048 6 6.. MMaax x TTeexxt t bboox x lleennggtth h –– 32,000 32,000 7 7.. MMaax x CCoonnttrrool l NNaammees s lleennggtth h –– 255. 255. 8 8.. EExxtteennssiioon n iin n VViissuuaal l BBaassiicc

Frm, bas, cls, res, vbx, ocx, frx, vbp, exe Frm, bas, cls, res, vbx, ocx, frx, vbp, exe 9

9.. WWhhaat t iis s ffrrxx??

When some controls like grid and third party control When some controls like grid and third party control placed in our application then it will create frx in placed in our application then it will create frx in run time.

run time. 1

100.. NNaamme e ssoomme e ddaatte e ffuunnccttiioonn

Dateadd(), Datediff(), Datepart(), Cdate() Dateadd(), Datediff(), Datepart(), Cdate() 1

(2)

15/4 = 3.75 and 15\4 = 3 15/4 = 3.75 and 15\4 = 3 12

12.. WWhhat at iis ks keeyywoworrd ud usseed td to co comomppaarre te to oo obbjjeectctss?? ISOperator – Returns Boolean.

ISOperator – Returns Boolean. 1

133.. HHoow w mmaanny y pprroocceedduurrees s aarre e iin n VVBB??

2. function and sub procedures (Ask what is the diff. 2. function and sub procedures (Ask what is the diff. Between them?)

Between them?)

Function Will return value but a sub procedure Function Will return value but a sub procedure wont return values…

wont return values…

14

14.. WhWherere we wilill wl we ge givive te the he opoptition on exexplplicicit it kekeywyworord ad andnd for what?

for what?

In the general declarations section. To trap In the general declarations section. To trap undeclared variables.

undeclared variables.

1

155.. WWhhaat t iis s FFrriieennd d VVaarriiaabbllee?? Scope sharable between projects. Scope sharable between projects.

16

16.. WWhhat at iis bs biinndidinngg? W? Whhaat at arre te tyyppees os of bf biinnddiningg?? Assigning variable with defined memory space.

Assigning variable with defined memory space.

Late Binding - Memory size is allotted in later stage. Late Binding - Memory size is allotted in later stage. Ex:- Dim x as object

Ex:- Dim x as object

Early Binding - Memory size is allotted while Early Binding - Memory size is allotted while declaring itself.

declaring itself.

New Key word is important. New Key word is important. Ex:- Dim x as New Object Ex:- Dim x as New Object 17

17.. WhWhat at is is ththe de dififfefererencnce be betetweween en PrPropopererty ty GeGet, t, SeSett and Let.

and Let.

Set – Value is assigned to ActiveX Object from the Set – Value is assigned to ActiveX Object from the form.

form.

Let – Value is retried to ActiveX Object from the Let – Value is retried to ActiveX Object from the form.

form.

Get- Assigns the value of an expression to a variable Get- Assigns the value of an expression to a variable or property.

or property.

1

188.. WWhhaat t iis Ms Maassk Ek Eddiit at annd wd whhy iy it t iis us usseedd??

Control. Restricted data input as well as formatted Control. Restricted data input as well as formatted data output.

data output.

19

(3)

State 0 – Source control is being dragged with the State 0 – Source control is being dragged with the range of a target.

range of a target.

1 – Out of the range of a target. 1 – Out of the range of a target.

2 – One positon in the target to another. 2 – One positon in the target to another.

20

20.. WhWhat at arare te the he tytype pe of of vavalilidadatition on avavaiailalablble ie in Vn VB?B? Field, Form

Field, Form

21

21.. WiWith th in in ththe fe fororm wm we e wawant nt to to chchececk k alall l ththe e tetext xt boboxx control are typed or not? How?

control are typed or not? How?

For each currentcontrol in controls For each currentcontrol in controls

if typeof currentcontrol is TextBox then if typeof currentcontrol is TextBox then end if

end if next

next

22

22.. WhWhat at is is ththe re resesulult t of of NuNull ll * * AnAny y vavalulue e = 0 = 0 (Z(Zerero)o)..

23

23.. WhWhat at is is cocontntrorol l ararraray ay and nd HoHow w mamany ny we we cacan n hahave ve itit with in the form?

with in the form?

Group of control share the same name. Max 32, 767. Group of control share the same name. Max 32, 767.

24

24.. WhWhat at is is ththe de defefauault lt momodedel ol of tf the he foformrm? A? And nd whwhat at isis it number?

it number?

VbModaless – 0 (Zero) – We can able to place another VbModaless – 0 (Zero) – We can able to place another window above this form.

window above this form. 25

25.. SuSupppposose e frfrom om foformrm1 1 to to foformrm2 2 obobjeject ct prpropoperertyty settings will arise to ?

settings will arise to ?

Invalid procedure call or argument (Run time error – Invalid procedure call or argument (Run time error – 5)

5) 26

26.. WhWhat at is is ththe de dififf bf betetweween en ththe Se Std td anand Cd Clalass ss MoModudulele?? Std Global with in the project. Cls Global through out Std Global with in the project. Cls Global through out the all project only thing is we want to set the type the all project only thing is we want to set the type lib. Class Modules can be Instantiated.

lib. Class Modules can be Instantiated. 2

277.. DDiiffffeerreennt tt tyyppe oe of If Innssttaannttiiaattiioonn?? Private – Only for the Specific Module. Private – Only for the Specific Module. Public not creatable – Private & Public Public not creatable – Private & Public Multi Use - Variable we have to declare. Multi Use - Variable we have to declare. Single Use – Not possible through dll. Single Use – Not possible through dll.

Global Multiuse – Have variable not Required to Global Multiuse – Have variable not Required to Declare.

Declare. Global

(4)

2

288.. HHoow w tto o ddeeccllaarre e DDlll l PPrroocceedduurree??

Declare function "<Function Name>" lib "<Lib Name>" Declare function "<Function Name>" lib "<Lib Name>" Alias "<Alias Name>" (Arg, …..) as Return type. Alias "<Alias Name>" (Arg, …..) as Return type.

1

1.. WWhhaat t iis s MMDDI I ffoorrmm? ? MMDDI I SSttyylleess??

We can have only one MDI form for a project. Multiple We can have only one MDI form for a project. Multiple Document Interface. This form type is VBModal. We have Document Interface. This form type is VBModal. We have set the Child property of the forms to True to place set the Child property of the forms to True to place forms inside this MDI.

forms inside this MDI.

Style availables 1. VbCascade 2. VbTitle Horizontal Style availables 1. VbCascade 2. VbTitle Horizontal 2 2.. HHoow mw maanny iy immaaggees cs caan bn be pe pllaacceed id in tn thhe ie immaagge le liisst ?t ? 64 64 3 3.. WWhhaat t iis s IInnpprroocceesss s aannd d OOuut t oof f PPrroocceessss??

Inprocess – It will run with in the memory. ( Local Inprocess – It will run with in the memory. ( Local Machine).

Machine).

Out of Process – It will run out of the memory Out of Process – It will run out of the memory Normally in the server side.

Normally in the server side. 4

4.. DDiifff f ttyyppe e oof f DDaattaattyyppeess?? LOB (Large Object Data type). LOB (Large Object Data type). CLOB (Stores Character Objects). CLOB (Stores Character Objects).

BLOB ( Store Binary Objects such as Graphic, Video BLOB ( Store Binary Objects such as Graphic, Video Chips and Sound files).

Chips and Sound files).

BFILE(Store file pointers to LOB It may Contain BFILE(Store file pointers to LOB It may Contain filename for photo’s store on CD_ROM).

filename for photo’s store on CD_ROM). 5

5.. WWhhaat t iis s ZZoorrddeer r MMeetthhoodd??

Object.Zorder = 1 or 0 Place a Specified mdiform form Object.Zorder = 1 or 0 Place a Specified mdiform form or control at the front or back of the z-order with n or control at the front or back of the z-order with n its Graphical Level.

its Graphical Level. 6 6.. WWhhaat it is ds diifff bf beettwweeeen tn thhe Ge Geenneerriic Vc Vaarriiaabblle ae anndd Specific Variable? Specific Variable? Generic Variable: Generic Variable:

Create Object Ex:-Ole-Automation . No need refer the Create Object Ex:-Ole-Automation . No need refer the object library.

object library. Specific Variable: Specific Variable:

Binding Procedure Early and Late Binding ( Can be Binding Procedure Early and Late Binding ( Can be Remove from the Memory).

Remove from the Memory). 7

7.. WWhhaat at arre pe prrooppeerrttiiees as avvaaiillaabblle ie in Cn Clliip Bp Booaarrdd?? No Properties Available. Only the methods they are No Properties Available. Only the methods they are SetText, GetText, Setdata(), Getformat(), Clear. SetText, GetText, Setdata(), Getformat(), Clear. 8

8.. WWhhaat t iis s DDllll??

Libraries of procedure external to the application but Libraries of procedure external to the application but

(5)

can be called from the application. can be called from the application. 9.

9. WWhhat at iis s TTaabbststrriip p ccoonntrtrooll? ? WWhhaat t iis s ththe e sstatarrttiingng Index value? How to locate it?

Index value? How to locate it?

It is tab control to place our controls with in the It is tab control to place our controls with in the form in multiple sheets.

form in multiple sheets.

Index starts with 1. And to identify Index starts with 1. And to identify If Tabstrip1.SelectedItem.Index = 1 Then If Tabstrip1.SelectedItem.Index = 1 Then ….. ….. End if End if 1 100.. WWhhy y wwe e uusse e TTrreeeevviieew w CCoonnttrrooll??

To list the hierarchial list of the node objects. Such To list the hierarchial list of the node objects. Such of files and Directories.

of files and Directories. 11

11.. WWhhy wy we ne neeeed Od OLLEE--AuAuttoomamattiioon?n?AAddvvananttaagegess??

Enables an application to exposes objects and methods Enables an application to exposes objects and methods to other Applications.

to other Applications.

No need to reserve memory. No need to write functions. No need to reserve memory. No need to write functions. Object library that simplify programming tasks. i.e., Object library that simplify programming tasks. i.e., No need to Object library. (OLB, TLB).

No need to Object library. (OLB, TLB). 12

12.. WhWhat at is is ththe de dififf bf betetweween en ththe Ce Crereatate Oe Objbjecect at and nd GeGett object?

object?

Create Object - To create an instance of an object. Create Object - To create an instance of an object. Get Object – To get the reference to an existing Get Object – To get the reference to an existing object.

object. 13

13.. HaHave ve yoyou cu crereatate Pe Proropepertrtieies as and nd MeMeththodods fs for or yoyourur own Controls?

own Controls?

Properties – Public variable of a Class Properties – Public variable of a Class Method – Public procedure of a class Method – Public procedure of a class 1

144.. WWhhaat t iis s CCoolllleeccttiioon n OObbjjeeccttss??

Similarly to arrays but is preferred over an array Similarly to arrays but is preferred over an array because of the following reasons.

because of the following reasons.

1. A collection objects uses less Memory than an 1. A collection objects uses less Memory than an array.

array.

2. It provides methods to add and delete members. 2. It provides methods to add and delete members. 3. It does not required reason statement when objects 3. It does not required reason statement when objects are added or deleted.

are added or deleted.

4. It does not have boundary limitations. 4. It does not have boundary limitations. 1

155.. WWhhaat t iis s SSttaattiic c VVaarriiaabbllee??

Its Scope will be available through out the life time. Its Scope will be available through out the life time. 1

(6)

Private cannot be used in front of DIM. Private cannot be used in front of DIM. 1

177.. WWhhaat t iis s IImmpplliicciitt??

Instance of specific copy of a class with its own Instance of specific copy of a class with its own settings for the properties defined in that class. settings for the properties defined in that class. Note: The implicity defined variable is never equal to Note: The implicity defined variable is never equal to nothing.

nothing. 1

188.. WWhhaat t aarre te thhe se sccooppe e oof tf thhe ce cllaassss?? Public , private, Friend

Public , private, Friend 19

19.. CaCan n we we abable le to to seset t InInststanancicing ng prpropoperertities es lilikeke Singleuse, GlobalSingleuse to ActiveXDll?

Singleuse, GlobalSingleuse to ActiveXDll? No.

No. 20

20.. In In prprojojecect pt proropepertrtieies is if wf we se set et UnUnatattetendnded ed whwhat at isis it mean?

it mean?

This cannot have user interface. This can be used for This cannot have user interface. This can be used for the COM creation.

the COM creation. 21

21.. WWhhat at aarre te thhe Se Sttyyle le PProroppeerrtitiees os of Cf Comombbo Bo Booxx?? Simple, Dropdown list – We can type and select. Simple, Dropdown list – We can type and select. Dropdown Combo – Only Drop Down.

Dropdown Combo – Only Drop Down. 22

22.. WWhhat at aarre te thhe Se Sttyyle le pproroppeerrtitiees os of Lf Lisist Bt Boxox?? Simple –Single Select , Extended. – Multiple Select. Simple –Single Select , Extended. – Multiple Select. 23

23.. WWhhat at aarre te thhe de diifffeferreent nt ttyypepes os of Df Diialaloog Bg Booxx?? Predefined, Custom, User Defined.

Predefined, Custom, User Defined. 2

244.. WWhhaat t iis s PPaarrsseer r BBuugg??

It is difficult to use database objects declared in a It is difficult to use database objects declared in a module from within a form.

module from within a form. 25

25.. WWhhat at iis ts thhe De Dlll rl reeqquuirireed fd foor rr rununnniing ng tthhe Ve VBB?? Vbrun300.dll Vbrun300.dll 2 266.. CCaan Wn We e ccrreeaatte e CCGGI sI sccrriipptts is in n VVBB?? Yes. Yes. 2 277.. HHoow w tto o cchhaanngge e tthhe e MMoouusse e PPooiinntteerr?? Screen.MousePointer = VBHourGlass/VBNormal. Screen.MousePointer = VBHourGlass/VBNormal. 28

28.. HHoow w tto o chcheecck k tthhe e ccoonndidittiioon n iin n MsMsggbboxox?? If(Msgbox("Do you want to delete this

(7)

Record",VbYesNo)=VbYes)Then End if Record",VbYesNo)=VbYes)Then End if

VB Questions (Client Server) VB Questions (Client Server) 1.

1. WWhhat at iis ds diifffeferreennce ce bbetetwweeeen dn daattagagrriid ad annd fd flleexxgrgriidd?? Datagrid – Editable.

Datagrid – Editable.

Flexigrid – Non-Editable. (Generally used for Read Flexigrid – Non-Editable. (Generally used for Read only purpose.)

only purpose.) 2

2.. WWhhaat t iis s AADDOO? ? WWhhaat t aarre e iitts s oobbjjeecctts s ??

ActiveX Data Object. ADO can access data from both ActiveX Data Object. ADO can access data from both flat files as well as the databases. I.e., It is flat files as well as the databases. I.e., It is

encapsulation of DAO, RDO, and OLE that is why we call encapsulation of DAO, RDO, and OLE that is why we call it as OLE-DB Technology.

it as OLE-DB Technology.

Objects are Connection, Record Set, Command, Objects are Connection, Record Set, Command, Parameter, field, Error, Property.

Parameter, field, Error, Property. 3

3.. WWhhaat t iis s DDaattaawwaarre e CCoonnttrrooll?? Any control bound to Data Control. Any control bound to Data Control.

Ex:- Textbox, Check Box, Picture Box, Image Control, Ex:- Textbox, Check Box, Picture Box, Image Control, Label, List box, Combo Box, DB Combo,

Label, List box, Combo Box, DB Combo, 4 4.. WWhhaat t aarre e ttwwo o vvaalliiddaatte e wwiitth h DDaatta a CCoonnttrrooll?? Data_Validate, Data_Error. Data_Validate, Data_Error. 5 5.. RReeccoorrd d sseet t ttyyppees as annd Nd Nuummbbeer r aavvaaiillaabblle e iin Vn VBB?? 3. 1- Dynaset, 0 – Table, 2 – Snap Shot.

3. 1- Dynaset, 0 – Table, 2 – Snap Shot. 6.

6. RReefeferreenntitiaal Il Inntteegrgriitty (y (TTaake ke ccaare re BBy jy jeet dt daattaababassee Engine).

Engine).

Cascade Delete, Cascade Update – is done setting Cascade Delete, Cascade Update – is done setting property of Attributes. property of Attributes. DbRelationDeleteCascade, DbRelationDeleteCascade, DbRelationUpdateCascade. DbRelationUpdateCascade. 7.

7. What What are are the the locks available locks available in in VisualVisual Basic?

Basic?

Locking is the process by which a DBMS Locking is the process by which a DBMS

restricts access to a row in a multi-user environment restricts access to a row in a multi-user environment

4 types of locks. They are 4 types of locks. They are 1 1.. BBaattcch h OOppttiimmiissttiicc 2 2.. OOppttiimmiissttiicc 3 3.. PPeessssiimmiissttiicc 4 4.. RReeaaddOOnnllyy

Operations in a relational database act on a complete Operations in a relational database act on a complete set of rows. The set of rows returned by a SELECT set of rows. The set of rows returned by a SELECT statement consists of all the rows that satisfy the statement consists of all the rows that satisfy the conditions in the WHERE clause of the statement. This conditions in the WHERE clause of the statement. This complete set of rows returned by the statement is complete set of rows returned by the statement is

(8)

known as the result set. Applications, especially known as the result set. Applications, especially those that are interactive and online, cannot always those that are interactive and online, cannot always work effectively with the entire result set as a unit. work effectively with the entire result set as a unit. These applications need a mechanism to work with one These applications need a mechanism to work with one row or a small block of rows at a time. Cursors are an row or a small block of rows at a time. Cursors are an extension to result sets that provide that mechanism. extension to result sets that provide that mechanism.

C Cuurrssoor r oor r lloocck k ttyyppee AAddvvaannttaaggeess DDiissaaddvvaannttaaggeess A AddOOppeennFFoorrwwaarrddOOnnlly y ((DDeeffaauulltt)) ·· LLoow w rreessoouurrccee r reeqquuiirreemmeenntts s ·· CCaannnnoot t ssccrroolll l bbaacckkwwaarrd d ·· NNo o ddaattaa concurrency concurrency A AddOOppeennSSttaattiicc ·· SSccrroollllaabblle e ((WWoonnt t ddeetteecct t cchhaannggees s mmaadde e aatt t thhe e ssaamme e ttiimme e bby y aannootthheer r aapppplliiccaattiioonn)) ·· NNo o ddaattaa concurrency concurrency A AddOOppeennKKeeyysseett ·· SSoomme e ddaatta a ccoonnccuurrrreennccy y ·· ScScrroollllaabblle e ·· Higher resou

Higher resource requirerce requirements ·ments · Not availabNot available inle in disconnected scenario disconnected scenario A AddOOppeennDDyynnaammiicc ·· HHiiggh h ddaatta a ccoonnccuurrrreennccy y ·· ScScrroollllaabblle e ·· H Hiigghheesst t rreessoouurrcce e rreeqquuiirreemmeenntts s ·· NNoot t aavvaaiillaabblle e iinn disconnected scenario disconnected scenario A AddLLoocckkRReeaaddOOnnllyy ·· LLoow w rreessoouurrcce e rreeqquuiirreemmeenntts s ·· HHiigghhllyy s sccaallaabblle e ·· DDaatta a nnoot t uuppddaattaabblle e tthhrroouuggh h ccuurrssoorr A AddLLoocckkBBaattcchhOOppttiimmiissttiicc ·· BBaattcch h uuppddaattees s · A· Alllloowwss d diissccoonnnneecctteed d sscceennaarriioos s ·· OOtthheer ur usseerrs s aabblle e tto ao acccceessss d daatta a ·· DDaatta a ccaan n bbe e cchhaannggeed d bby y mmuullttiipplle e uusseerrs s aat t oonnccee A AddLLoocckkPPeessssiimmiissttiicc ·· DDaatta a ccaannnnoot t bbe e cchhaannggeed d bby y ootthheerr u usseerrs s wwhhiille e lloocckkeed d ·· PPrreevveenntts s ootthheer r uusseerrs s ffrroomm accessing data while locked

accessing data while locked A

AddLLoocckkOOppttiimmiissttiicc ·· OOtthheer r uusseerrs s aabblle e tto o aacccceesss s ddaatta a ·· Data can be changed by multiple users at once

Data can be changed by multiple users at once

8.What is the diff between RDO and ADO? 8.What is the diff between RDO and ADO?

RDO is Hierarchy model where as ADO is Object RDO is Hierarchy model where as ADO is Object model. ADO can access data from both flat files as model. ADO can access data from both flat files as well as the data bases. I.e., It is encapsulation of well as the data bases. I.e., It is encapsulation of DAO, RDO , OLE that is why we call it as OLE-DB

DAO, RDO , OLE that is why we call it as OLE-DB Technology.

Technology. 7.

7. HHoow cw caan wn we e cacalll l StStoorred ed pprrococeedduure re oof Bf Baacck Ek Ennd id in n RDRDOO and ADO ?

and ADO ?

In RDO – We can call using RDO Query Objects. In RDO – We can call using RDO Query Objects. In ADO – We can call using Command Objects. In ADO – We can call using Command Objects. 8.

8. WWhhat at iis ts thhe de diifffferereennt bt beettweweeen Mn Miiccrrososoofft Ot ODDBBC DC Drriiveverr and Oracle OBDC Driver?

and Oracle OBDC Driver?

Microsoft ODBC driver will support all the methods and Microsoft ODBC driver will support all the methods and properties of Visual Basic. Where as the Oracle not. properties of Visual Basic. Where as the Oracle not. 9.

9. WWhhat at aarre te thhe Te Teecchnhnoollogogiiees fs foor r AcAccceessssiinng Dg Daattaababassee from Visual Basic?

(9)

DAO, Data Control, RDO, ODBCDIRECT, ADO, ODBC API , DAO, Data Control, RDO, ODBCDIRECT, ADO, ODBC API , 0040.

0040. 1

100.. CCaalllliinng g SSttoorreed d PPrroocceedduurrees s iin n VVBB??

1. Calling Simply the Procedure with out Arguments 1. Calling Simply the Procedure with out Arguments "Call ProcedureName}"

"Call ProcedureName}"

2. If it is with Arguments Means then 2. If it is with Arguments Means then Declare the Query Def qy

Declare the Query Def qy Set Qy as New Query def Set Qy as New Query def

Qy.SQL = "{Call ProcedureName(?,?,?)}" Qy.SQL = "{Call ProcedureName(?,?,?)}" qy(0)=val(Txt1.Text) qy(0)=val(Txt1.Text) qy(1)=val(Txt2.Text) qy(1)=val(Txt2.Text) qy(2)=val(Txt3.Text) qy(2)=val(Txt3.Text) Set Rs = Qy.OpenresultSet Set Rs = Qy.OpenresultSet Txt(1)=Rs.RdoColumns(0) Txt(1)=Rs.RdoColumns(0) 1 111.. WWhhaat t iis s MMAAPPI I ??

Messaging Application programing Interface. Messaging Application programing Interface. 1

122.. DDiiffffeerreennt t ttyyppe e oof f PPaassssiinng g VVaalluuee?? By value, By ref, Optional, Param Array. By value, By ref, Optional, Param Array.

Note:- Optional keyword cannot be used while declaring Note:- Optional keyword cannot be used while declaring arguments for a function using param array.

arguments for a function using param array. 13

13.. WWhhat at aarre e tthhe e ddiifffeferreent nt ttyypepes s oof f eerrrororr?? Syntax Errors, Runtime , Logic.

Syntax Errors, Runtime , Logic. 14

14.. WhWhat at is is SeSeek ek MeMeththod od whwhicich th typype oe of f rerecocord rd seset it iss available this?

available this?

Only in DbOpenTables. Only in DbOpenTables.

Syntax: rs.index = "empno" Syntax: rs.index = "empno" rs.seek "=" , 10

rs.seek "=" , 10

If with our setting the rs.index then run time error If with our setting the rs.index then run time error will occur.

will occur. 15

15.. WWhhat at iis Cs Ceenntrtraalliizazattiion on EErrroror Hr Hananddlliningg?? Writing funciton and calling it when error occurs. Writing funciton and calling it when error occurs. 1

166.. HHaannddlliinng g EErrrroor r iin n CCaalllliinng g cchhaaiinn..

This will call the top most error where the error is This will call the top most error where the error is handled.

handled. 17

17.. To To coconnnnecect tt the he DaData ta CoContntrorol wl witith Bh Bacack ek end nd WhWhat at araree all the properties to be set?

(10)

Data source Name, Record Source Name Data source Name, Record Source Name 1 188.. HHoow w tto o ttrraap p DDaatta a BBaasse e EErrrroorr?? Dim x as RDOError Dim x as RDOError X(0).Des X(0).Des X(1).Number X(1).Number 1 199.. WWhhaat t iis s vviieew w PPoorrtt??

The area under which the container provides the view The area under which the container provides the view of the ActiveX Document is known as a view port. of the ActiveX Document is known as a view port. 20

20.. WhWhat at memeththodods as are re usused ed fofor Dr DBGBGririd id in un unbnbouound nd momodede?? AddData, EditData, Readdata, WriteData.

AddData, EditData, Readdata, WriteData. 21

21.. HHoow tw to io innccrreaeasse te thhe De Daatte ce coorrrreespspoonndidinng wg wiitthh month,date,year?

month,date,year?

DateSerial(year(Now),Month(Now)+1,1) DateSerial(year(Now),Month(Now)+1,1)

Hour, min, sec, month, year, DateSerial, dateadd, Hour, min, sec, month, year, DateSerial, dateadd, datediff, weekday, datevalue, timeserial,timevalue. datediff, weekday, datevalue, timeserial,timevalue.

2

222.. SSeettttiinng g tthhe e CCuurrssoorrss.. Default Cursor – 0

Default Cursor – 0

ODBC Cursor (Client side) – 1 ODBC Cursor (Client side) – 1

ServerSide Cursors (More Network traffic) - 2 ServerSide Cursors (More Network traffic) - 2 2

233.. CCuurrssoor mr maannaaggeemmeenntt

Client Batch – Batch up the Multiple SQL Statements in Client Batch – Batch up the Multiple SQL Statements in a single string and Send them to the Server at one a single string and Send them to the Server at one time.

time. 2

244.. WWhhaat t aarre e tthhe e rreeccoorrd d sseet t ttyyppeess??

RdOpenFowardOnly 0 (Default used only for the read RdOpenFowardOnly 0 (Default used only for the read only purpose) only purpose) RdOpenStatic 1 RdOpenStatic 1 RdOpenDynamic 2 RdOpenDynamic 2

RdOpenKeySet 3 (Normally used for the live project) RdOpenKeySet 3 (Normally used for the live project) 2

255.. DDiifff f ttyyppees s oof f LLoocck k TTyyppeess?? RdConcurReadOnly 0 (Default)

RdConcurReadOnly 0 (Default)

RdConcurLock 1 (Pessimistic Locking) RdConcurLock 1 (Pessimistic Locking) RdConcurRowver 2 (Optimistic Lociking) RdConcurRowver 2 (Optimistic Lociking) RdConcurValues 3 RdConcurValues 3 RdConcurBatch 4 RdConcurBatch 4 2 266.. WWhhaat t tthhe e RRDDO O MMeetthhoodds s aannd d EEvveennttss?? Methods Events Methods Events

(11)

Begin Trans Validate Begin Trans Validate Commit Trans Reposition Commit Trans Reposition Rollback Trans Error Rollback Trans Error Cancel Query Complied Cancel Query Complied Refresh Refresh Update Controls Update Controls Update row Update row 2 277.. WWhhaat t iis s SSttaattiic c CCuurrssoorr?? In ADO Snap Shot is called so. In ADO Snap Shot is called so. 2 288.. WWhhaat t iis s MMiixxeed d CCuurrssoorrss?? Static + Keyset Static + Keyset 2 299.. WWhhaat t iis s FFiirreeHHoouusse e CCuurrssoorrss?? Forward Only Some time Updateable Forward Only Some time Updateable 3

300.. WWhhaat t iis s DDBBSSqqllPPaassssTThhrroouugghh??

It will By Passing the Jet Query Processor. It will By Passing the Jet Query Processor. 3

311.. WWhhaat t iis s DDBBFFaaiillEErrrroorr??

Rolls Back updates if any errors Occurs. Rolls Back updates if any errors Occurs. 3

322.. DDSSN LN Leesss Cs Coonnnneeccttiioonn??

"Server=Oracle; Driver={Microsoft ODBC for Oracle};" "Server=Oracle; Driver={Microsoft ODBC for Oracle};" 3

333.. WWhhaat t iis s RRddEExxeeccDDiirreecctt??

Bypasses the Creation of a stored procedure to execute Bypasses the Creation of a stored procedure to execute the query. Does not apply to Oracle.

the query. Does not apply to Oracle. 34

34.. RdRdoPoPararamameteter er ObObjeject ct RdRdoPoPararamametetererCoConsnstatantnt Direction RdparamInput Direction RdparamInput RdparamInputOutput RdparamInputOutput RdParamOutput RdParamOutput Name Name Type Type Value Value . . *********************************************************************** *********************************************************************** **************** **************** ASP – ASP –

1. <SCRIPT LANGUAGE="VBScript" RUNAT=Server> 1. <SCRIPT LANGUAGE="VBScript" RUNAT=Server>

a = 1 a = 1

(12)

</SCRIPT> </SCRIPT> <SCRIPT LANGUAGE="VBScript"> <SCRIPT LANGUAGE="VBScript"> a = 2 a = 2 </SCRIPT> </SCRIPT> <% <% Response.Write a Response.Write a %> %>

In the sample code shown above, what will be written In the sample code shown above, what will be written to the to the screen? screen? A. 1 A. 1 B. 2 B. 2 C. 1, 2 C. 1, 2 D. 1&2 D. 1&2 E. Nothing. E. Nothing. 2. <% 2. <% Set Application("Thing") = Set Application("Thing") = Server.CreateObject("THINGDOER.thingy") Server.CreateObject("THINGDOER.thingy") %> %>

The above code appears in the global.asa file. What The above code appears in the global.asa file. What would it

would it accomplish? accomplish?

A. It would create a "Thing" object and place it in A. It would create a "Thing" object and place it in Contents Collection of

Contents Collection of the Application object. the Application object.

B. It would create a "Thing" object and place it in B. It would create a "Thing" object and place it in StaticObjects

StaticObjects

Collection of the Application object. Collection of the Application object.

C. It would create a "Thing" object and place it in C. It would create a "Thing" object and place it in the Application.Buffer

the Application.Buffer

Collection Of the Application object. Collection Of the Application object.

D. It would create an application-level variable named D. It would create an application-level variable named "Thing" with the

"Thing" with the

value of the object property "THINGDOER.thingy". value of the object property "THINGDOER.thingy". E. It would fail to create a "Thing" object because E. It would fail to create a "Thing" object because the code requires the

the code requires the

Application.Lock and Application.Unlock methods. Application.Lock and Application.Unlock methods. 3. <% iPos = Instr("Hello World","r") %>

3. <% iPos = Instr("Hello World","r") %>

Referring to the above, what is the value of iPos? Referring to the above, what is the value of iPos? A. 0 A. 0 B. 1 B. 1 C. 2 C. 2 D. 8 D. 8 E. 9 E. 9 4. <% varType = rsTest("field1").type %> 4. <% varType = rsTest("field1").type %>

In the database table, if the datatype for field1 In the database table, if the datatype for field1 (shown

(shown

above) is Number, what is the value of varType? above) is Number, what is the value of varType? A. The field value.

A. The field value.

B. A string description. B. A string description. C. The field name.

(13)

D. NULL. D. NULL.

E. An enumerator. E. An enumerator.

5. What is the program ID (ProgID) for ActiveX Data 5. What is the program ID (ProgID) for ActiveX Data Objects in 2-tier and 3-tier database applications? Objects in 2-tier and 3-tier database applications? A. ADO A. ADO B. RDODB B. RDODB C. ADODB C. ADODB D. RDS D. RDS E. OLEDB E. OLEDB

6. Which choice is NOT an ADO collection? 6. Which choice is NOT an ADO collection? A. Properties A. Properties B. Records B. Records C. Fields C. Fields D. Errors D. Errors E. Parameters E. Parameters

7. Which will NOT set the scope of an Active Server 7. Which will NOT set the scope of an Active Server Component?

Component?

A. Setting the [component name].scope property. A. Setting the [component name].scope property. B. Using the Server.CreateObject method.

B. Using the Server.CreateObject method.

C. Placing it in the Session or Application OnStart C. Placing it in the Session or Application OnStart event handler.

event handler.

D. Instantiating the component in the global.asa file. D. Instantiating the component in the global.asa file. E. Using the <OBJECT> tag.

E. Using the <OBJECT> tag. 8. How to handle Error in ASP 8. How to handle Error in ASP

A. Using On Error Goto <ErrorPart> A. Using On Error Goto <ErrorPart> B. Using On Error Resume

B. Using On Error Resume

C. Using On Error Resume Next C. Using On Error Resume Next D. Using On Error Goto 0

D. Using On Error Goto 0 9. <%

9. <%

intA = 3 intA = 3

sStrA = "Hello World" sStrA = "Hello World"

sStrB = "Hello World" + intA sStrB = "Hello World" + intA Response.Write sStrB

Response.Write sStrB %>

%>

What would be the result of the above code? What would be the result of the above code? A. Type mismatch error

A. Type mismatch error

B. "Hello World, Hello World, Hello World" B. "Hello World, Hello World, Hello World" C. 0 C. 0 D. "Hello World 3" D. "Hello World 3" E. "Hello World" E. "Hello World"

10. What happens when a client submits a form which 10. What happens when a client submits a form which changes the

changes the

value of an Application variable? value of an Application variable?

A. Client actions cannot change Application variables. A. Client actions cannot change Application variables.

(14)

B. The change is not visible to any client until the B. The change is not visible to any client until the application is stopped

application is stopped and started.

and started.

C. The change is only visible to future requests made C. The change is only visible to future requests made by that

by that

client during their current session. client during their current session.

D. The change is visible to all clients, but only D. The change is visible to all clients, but only after they

after they

complete their current sessions and begin a new complete their current sessions and begin a new session.

session.

E. The change is visible to all clients immediately E. The change is visible to all clients immediately after the

after the

form is processed by the server. form is processed by the server.

11. ADO is an object model for accessing which of the 11. ADO is an object model for accessing which of the following?

following?

A. Relational data via Jet. A. Relational data via Jet. B. Local or SQL data via Jet. B. Local or SQL data via Jet. C. Relational data via ODBC. C. Relational data via ODBC.

D. Non-relational data via DSN-less ODBC. D. Non-relational data via DSN-less ODBC. E. All types of data via OLE DB.

E. All types of data via OLE DB.

12. Which of the following are Server Object methods ( 12. Which of the following are Server Object methods ( Choose Two) Choose Two) A. HTMLEncode,MapPath A. HTMLEncode,MapPath B. URLEncode,ScriptTimeout B. URLEncode,ScriptTimeout C. URLEncode,CreateObject C. URLEncode,CreateObject D. ScriptTimeout,Abandon D. ScriptTimeout,Abandon

13. Following is the code Server.MapPath (".") 13. Following is the code Server.MapPath (".") consider the path is

consider the path is

C:\Inetpub\WWWRoot\MAT\Default.asp. What will be the C:\Inetpub\WWWRoot\MAT\Default.asp. What will be the output output A. C:\InetPUb A. C:\InetPUb B. C:\InetPUb\WWWroot B. C:\InetPUb\WWWroot C. C:\InetPUb\wwwroot\MAT C. C:\InetPUb\wwwroot\MAT D. Error D. Error 14. ClientCertificate is a collection of 14. ClientCertificate is a collection of A. Server A. Server B. Response B. Response C. Request C. Request D. ObjectContext D. ObjectContext 15. IsClientConnected is a property of 15. IsClientConnected is a property of A. Server A. Server B. Response B. Response C. Request C. Request D. Sesssion D. Sesssion

16) What happens to a HTML page? 16) What happens to a HTML page?

The browser makes a HTTP request; the server gives a The browser makes a HTTP request; the server gives a

(15)

HTTP response to the browser and the browser converts HTTP response to the browser and the browser converts into a HTML page.

into a HTML page.

17) What happens to ASP pages? 17) What happens to ASP pages?

The browser makes a HTTP request; the server does the The browser makes a HTTP request; the server does the processing and gives a HTML response to the browser. processing and gives a HTML response to the browser. 18) What are the Web Servers supporting ASP?

18) What are the Web Servers supporting ASP?

· Internet Information Server (IIS) on Windows NT · Internet Information Server (IIS) on Windows NT · Personal Web Server (PWS) on Windows 95

· Personal Web Server (PWS) on Windows 95 · Peer Web Services on Windows NT

· Peer Web Services on Windows NT

19) Explain the POST & GET Method or Explain the 19) Explain the POST & GET Method or Explain the difference between them.

difference between them. POST METHOD:

POST METHOD:

The POST method generates a FORM collection, which is The POST method generates a FORM collection, which is sent as a HTTP request body. All the values typed in sent as a HTTP request body. All the values typed in the form will be stored in the FORM collection.

the form will be stored in the FORM collection. GET METHOD:

GET METHOD:

The GET method sends information by appending it to The GET method sends information by appending it to the URL (with a question mark) and stored as

the URL (with a question mark) and stored as

A Querystring collection. The Querystring collection A Querystring collection. The Querystring collection is passed to the server as name/value pair.

is passed to the server as name/value pair. The length of the URL should be less than 255 The length of the URL should be less than 255 characters.

characters.

20) What is the command to display characters to the 20) What is the command to display characters to the HTML page? HTML page? Response.Write Response.Write 21) What is a variable? 21) What is a variable?

Variable is a memory location through which the actual Variable is a memory location through which the actual values are stored/retrieved. Its value can be changed. values are stored/retrieved. Its value can be changed. 22) What are LOCAL and GLOBAL variables?

22) What are LOCAL and GLOBAL variables?

Local variables lifetime ends when the Procedure ends. Local variables lifetime ends when the Procedure ends. Global variables lifetime begins at the start of the Global variables lifetime begins at the start of the script and ends at the end of the script and it can be script and ends at the end of the script and it can be used by any procedure within the script. Declaring a used by any procedure within the script. Declaring a variable by using the keyword PRIVATE makes the

variable by using the keyword PRIVATE makes the variable global within the script, but if declared variable global within the script, but if declared using PUBLIC, then all scripts can refer the variable. using PUBLIC, then all scripts can refer the variable. 23) Naming constraints for a variable.

23) Naming constraints for a variable. It can be up to 255 characters

It can be up to 255 characters Must start with an alphabet Must start with an alphabet

Must not contain an embedded period or full-stop Must not contain an embedded period or full-stop 24) VBScript/ JavaScript is case- insensitive 24) VBScript/ JavaScript is case- insensitive

(16)

JavaScript is case sensitive JavaScript is case sensitive

25) What are the special sub-types in VBScript? 25) What are the special sub-types in VBScript? EMPTY: has no value

EMPTY: has no value

NULL: Value does not exist (conjunction with database) NULL: Value does not exist (conjunction with database) OBJECT:

OBJECT:

26) What is the Order of precedence for LOGICAL 26) What is the Order of precedence for LOGICAL Operators.

Operators.

NOT, AND, OR, XOR, EQV, IMP NOT, AND, OR, XOR, EQV, IMP 27) What is Response Object? 27) What is Response Object?

It controls the information sent to the user. The It controls the information sent to the user. The various methods are:

various methods are:

Response.Write – Sends information directly to a Response.Write – Sends information directly to a browser

browser

Response.Redirect – Directs a user to a URL other than Response.Redirect – Directs a user to a URL other than the requested URL

the requested URL

Response.ContentType – Controls the type of content Response.ContentType – Controls the type of content sent

sent

Response.Cookies – Sets cookie values Response.Cookies – Sets cookie values Response.Buffer – To Buffer information Response.Buffer – To Buffer information

28) How will you set the values for cookies? 28) How will you set the values for cookies?

<% Response.Cookies("variable name ")="value" %>. <% Response.Cookies("variable name ")="value" %>.

29) What is the function of Buffer in Response Object? 29) What is the function of Buffer in Response Object? Buffer controls the HTML output stream manually.

Buffer controls the HTML output stream manually. 30) What are the methods by which output stream is 30) What are the methods by which output stream is controlled?

controlled?

· Flush – sends previous buffered output to the client · Flush – sends previous buffered output to the client immediately, but continues processing the script.

immediately, but continues processing the script. · Clear – erases any already-buffered HTML.

· Clear – erases any already-buffered HTML.

· End – causes the server to stop processing the · End – causes the server to stop processing the script.

script.

31) What are the properties used to control the 31) What are the properties used to control the expiration of the page?

expiration of the page?

· Expires – specifies the number of minutes before a · Expires – specifies the number of minutes before a page

page cached cached on on a a browser browser expires.expires.

· ExpiresAbsolute – sets the date and time at which a · ExpiresAbsolute – sets the date and time at which a page cached on a browser expires.

page cached on a browser expires.

32) What are the methods in Application Object? 32) What are the methods in Application Object?

· Lock – prevents clients from modifying the variables · Lock – prevents clients from modifying the variables stored in the Application object.

stored in the Application object.

· Unlock – removes the lock from variables stored in · Unlock – removes the lock from variables stored in

(17)

the Application object. the Application object.

33) What are the event handlers of Application Object? 33) What are the event handlers of Application Object? · Application_OnStart – This event will be fired when · Application_OnStart – This event will be fired when the first visitor hits the page.

the first visitor hits the page.

· Application_OnEnd – This event runs when the server · Application_OnEnd – This event runs when the server is stopped.

is stopped.

34) What is Session Object? 34) What is Session Object?

It stores information about a User’s session. Gives a It stores information about a User’s session. Gives a notification when a user session begins or ends.

notification when a user session begins or ends. 35) What is a session?

35) What is a session?

A user accessing an application is known as a session. A user accessing an application is known as a session. 36) What are the collections of Session Object?

36) What are the collections of Session Object? · Contents collection – contains all the variables · Contents collection – contains all the variables established for a session without using the <OBJECT> established for a session without using the <OBJECT> tag.

tag.

· Static collection – contains all the objects created · Static collection – contains all the objects created with the <OBJECT> tag within session scope.

with the <OBJECT> tag within session scope. 37) What are the properties of Session Object? 37) What are the properties of Session Object? · SessionID – returns the session identification · SessionID – returns the session identification number for each user.

number for each user.

· Timeout – sets the timeout period assigned to the · Timeout – sets the timeout period assigned to the Session object for any application, in minutes. Session object for any application, in minutes. · CodePage – determines the code page that will be · CodePage – determines the code page that will be used to display content.

used to display content.

· LCID – a locale identifier, which determines time · LCID – a locale identifier, which determines time zone and language, rules for the system.

zone and language, rules for the system. 38) What are the methods in Session Object? 38) What are the methods in Session Object?

The Session Object has only one method, which is The Session Object has only one method, which is Abandon. It destroys all the objects stored in a Abandon. It destroys all the objects stored in a

Session Object and releases the server resources they Session Object and releases the server resources they occupied.

occupied.

39) Name some of the ASP components? 39) Name some of the ASP components? · Ad Rotator component – a way to manage · Ad Rotator component – a way to manage advertisements on the web site.

advertisements on the web site.

· Content Linker component – a technique to direct · Content Linker component – a technique to direct users through a set of pages on a web site by creating users through a set of pages on a web site by creating a list of URLs and description of the next and

a list of URLs and description of the next and previous pages.

previous pages.

· Browser Capabilities component – allows to customize · Browser Capabilities component – allows to customize the page to the ability of the browser viewing it. the page to the ability of the browser viewing it. ·

· Database Database Access Access component component – – allows allows to to access access datadata from the database

(18)

40) What are Scripting Objects? 40) What are Scripting Objects?

Objects that can enhance the application are known as Objects that can enhance the application are known as the Scripting Objects.

the Scripting Objects.

41) What are the ASP Scripting Objects? 41) What are the ASP Scripting Objects?

The Dictionary object, the FileSystemObject object, The Dictionary object, the FileSystemObject object, TextStream object.

TextStream object.

42) What is a Dictionary object? 42) What is a Dictionary object?

It lets you store and retrieve information in a It lets you store and retrieve information in a flexible data structure. Each value or information flexible data structure. Each value or information stored in a Dictionary is associated with a key stored in a Dictionary is associated with a key through which the information can be retrieved. through which the information can be retrieved. 43) What is a FileSystemObject object?

43) What is a FileSystemObject object?

It provides access to the physical file system of the It provides access to the physical file system of the web server. It gets and manipulates information about web server. It gets and manipulates information about all drives in a server, folders and sub-folders on a all drives in a server, folders and sub-folders on a drive and files inside a folder.

drive and files inside a folder. 44) What is Server-Side includes? 44) What is Server-Side includes?

It provides extra information by which it makes the It provides extra information by which it makes the site easier to manage. It can include text files using site easier to manage. It can include text files using the #include statement, retrieve the size and last the #include statement, retrieve the size and last modification date of a file, defines how variables and modification date of a file, defines how variables and error messages are displayed and inserts the values of error messages are displayed and inserts the values of HTTP variables in the page sent back to the browser. HTTP variables in the page sent back to the browser.

ASP – Grade C ASP – Grade C

1. What is the result of using Option Explicit? 1. What is the result of using Option Explicit? A. This applies only to Visual Basic, not VBScript. A. This applies only to Visual Basic, not VBScript. B. All variables must be dimensioned before use. B. All variables must be dimensioned before use. C. All variables are dimensioned at run-time. C. All variables are dimensioned at run-time.

D. Forces all <SELECT> controls to have a SELECTED D. Forces all <SELECT> controls to have a SELECTED option.

option.

E. Requires all variables be cast as specific E. Requires all variables be cast as specific DataTypes.

DataTypes.

2. What should be used in order to determine if the 2. What should be used in order to determine if the cookie "FavoriteFlavors" in the request object

cookie "FavoriteFlavors" in the request object contains more than one entry?

contains more than one entry?

A. Request.Cookies("FavoriteFlavors").HasItems A. Request.Cookies("FavoriteFlavors").HasItems B. Request.Cookies("FavoriteFlavors").Collection.Count B. Request.Cookies("FavoriteFlavors").Collection.Count C. Request.Cookies("FavoriteFlavors").Dictionary C. Request.Cookies("FavoriteFlavors").Dictionary D. Request.Cookies("FavoriteFlavors").HasKeys D. Request.Cookies("FavoriteFlavors").HasKeys E. Request.Cookies("FavoriteFlavors").Count E. Request.Cookies("FavoriteFlavors").Count

(19)

3. When is the Session_OnStart event fired? 3. When is the Session_OnStart event fired?

A. Upon every request from an application by a client A. Upon every request from an application by a client for an .asp document.

for an .asp document.

B. Upon the first request from an application by a B. Upon the first request from an application by a client for any file in the application.

client for any file in the application.

C. Upon the first request for an .asp document from an C. Upon the first request for an .asp document from an application by a client.

application by a client.

D. Upon the first request for the global.asa file, in D. Upon the first request for the global.asa file, in which the event handler is located.

which the event handler is located.

E. Upon the first request for an. html or .asp E. Upon the first request for an. html or .asp document from an application by client

document from an application by client

4. What does Internet Information Server (IIS) assume 4. What does Internet Information Server (IIS) assume to be

to be the the default language default language for for Active Server Active Server Pages?Pages? A. Jscript A. Jscript B. JavaScript B. JavaScript C. JAVA C. JAVA D. VBScript D. VBScript E. ECMAScript E. ECMAScript

5. What should the developer use in order to have an 5. What should the developer use in order to have an Active Server Page (ASP) invokes a stored procedure on Active Server Page (ASP) invokes a stored procedure on a SQL Server database? a SQL Server database? A. ADO A. ADO B. RDO B. RDO C. RDS C. RDS D. OLEDB D. OLEDB

E. None of the above. E. None of the above.

6. ‘onStart' and 'onEnd' are events of what object(s)? 6. ‘onStart' and 'onEnd' are events of what object(s)?

A. Application only. A. Application only. B. Session only. B. Session only. C. Server only. C. Server only.

D. Application and Session only. D. Application and Session only. E. Application, Session, and Server. E. Application, Session, and Server.

7. What must be installed on an IIS4 machine to use 7. What must be installed on an IIS4 machine to use the CDONTS e-mail server object?

the CDONTS e-mail server object? A. FTP service A. FTP service B. SMTP service B. SMTP service C. IIS administrator C. IIS administrator D. Exchange Server D. Exchange Server E. IPX/SPX protocol E. IPX/SPX protocol

8. Which line of code would instantiate the Browser 8. Which line of code would instantiate the Browser Capabilities component? Capabilities component? A. objBrowser = A. objBrowser = Server.CreateObject("MSWC.BrowserType") Server.CreateObject("MSWC.BrowserType") B. Set objBrowser = B. Set objBrowser = Server.CreateObject("MSWC.BrowserType") Server.CreateObject("MSWC.BrowserType")

(20)

C. var objBrowser = C. var objBrowser =

Server.CreateObject("MSWC.BrowserType") Server.CreateObject("MSWC.BrowserType")

D. var objBrowser = CreateObject("MSWC.BrowserType") D. var objBrowser = CreateObject("MSWC.BrowserType") E. var objBrowser = Server.CreateObject("BrowserType") E. var objBrowser = Server.CreateObject("BrowserType") 9. What is the Default ScriptTimeOut for Server

9. What is the Default ScriptTimeOut for Server Object? Object? A. 20 Sec A. 20 Sec B. 30 Sec B. 30 Sec C. 60 Sec C. 60 Sec D. 90 Sec D. 90 Sec

10. How many Max Cookies can we create in Server? 10. How many Max Cookies can we create in Server? A. 10 A. 10 B. 20 B. 20 C. 30 C. 30 D. 40 D. 40

11. How Many Types of Cookies 11. How Many Types of Cookies A. 3 A. 3 B. 2 B. 2 C. 1 C. 1 D. 4 D. 4

12.What is ASP (Active Server Pages)? 12.What is ASP (Active Server Pages)?

ASP is a server side-scripting environment for ASP is a server side-scripting environment for

building dynamic and interactive web pages. Since the building dynamic and interactive web pages. Since the scripts run on the server side, the web server does scripts run on the server side, the web server does all the processing.

all the processing.

13. What are the advantages of using ASP? 13. What are the advantages of using ASP?

· Minimizes network traffic by limiting the need for · Minimizes network traffic by limiting the need for the browser and server to talk to each other

the browser and server to talk to each other

· Makes for quicker loading time since HTML pages are · Makes for quicker loading time since HTML pages are only downloaded

only downloaded

· Allows to run programs in languages that are not · Allows to run programs in languages that are not supported by the browser

supported by the browser

· Can provide the client with data that does not · Can provide the client with data that does not reside on the client’s machine

reside on the client’s machine

· Provides improved security measures since the script · Provides improved security measures since the script cannot be viewed by

cannot be viewed by the browser

the browser

14. What is HTML(Hypertext Markup Language)? 14. What is HTML(Hypertext Markup Language)?

It’s a method by which web pages can be built and It’s a method by which web pages can be built and generally used for formatting and linking text. generally used for formatting and linking text. 15. What are the types of HTML?

15. What are the types of HTML?

· Static HTML – Browser uses HTTP to request HTML file · Static HTML – Browser uses HTTP to request HTML file from the Web Server

from the Web Server

· Dynamic HTML – Browser uses HTTP to request an · Dynamic HTML – Browser uses HTTP to request an

(21)

executable application rather than a Static HTML file executable application rather than a Static HTML file 16. What is the difference between ASP and HTML? Or 16. What is the difference between ASP and HTML? Or Why ASP is better than HTML?

Why ASP is better than HTML?

· ASP executes code on the server side whereas the · ASP executes code on the server side whereas the browser interprets HTML.

browser interprets HTML.

· ASP can use any scripting languages · ASP can use any scripting languages

· Gets feedback from the user and return information · Gets feedback from the user and return information to the user

to the user

· Create pages that will be customized to display only · Create pages that will be customized to display only things that will be of interest to a particular user things that will be of interest to a particular user · Can edit contents of a web page by updating a text · Can edit contents of a web page by updating a text file or a database rather than the HTML code itself file or a database rather than the HTML code itself 17. What is a Web Server?

17. What is a Web Server?

It’s a Computer that provides Web services on the It’s a Computer that provides Web services on the Internet or on a local Intranet. It is designed to Internet or on a local Intranet. It is designed to locate, address and send out simple HTML pages to all locate, address and send out simple HTML pages to all other users who access these pages.

other users who access these pages. 18. What is IIS?

18. What is IIS?

IIS is a Web Server that provides Web services, not IIS is a Web Server that provides Web services, not only for web pages but also for ftp sites and video only for web pages but also for ftp sites and video and audio services. It integrates with the database and audio services. It integrates with the database facilities of SQL Server.

facilities of SQL Server.

19. What do you need to run ASP? 19. What do you need to run ASP? A browser and a Web server.

A browser and a Web server.

20. What is a Scripting Language? 20. What is a Scripting Language?

It permits to create more interactive Web Pages. It permits to create more interactive Web Pages. Validation, formatting of web pages can be done. Validation, formatting of web pages can be done. VBScript, JavaScript are some examples.

VBScript, JavaScript are some examples.

21. Which is the default Scripting Language of ASP 21. Which is the default Scripting Language of ASP (server-side)?

(server-side)? VBScript

VBScript

22. Which is the default Scripting Language on the 22. Which is the default Scripting Language on the client side?

client side? JavaScript JavaScript

23. What is Global.asa file? 23. What is Global.asa file?

It is text file that contains details about an ASP It is text file that contains details about an ASP application, such as when it should begin and end. application, such as when it should begin and end. 24. Which is the default Data types in VBScript? 24. Which is the default Data types in VBScript? Variant is the default data type in VBScript, which Variant is the default data type in VBScript, which can store a value of any type.

(22)

25. What is the Order of precedence for ARITHMETIC 25. What is the Order of precedence for ARITHMETIC Operators.

Operators.

^, -(negation), *or /, \, mod, + or – ^, -(negation), *or /, \, mod, + or –

26. Where will you code OPTION EXPLICIT in an ASP 26. Where will you code OPTION EXPLICIT in an ASP application? WHY?

application? WHY?

It should be the first statement before the <HTML> tag It should be the first statement before the <HTML> tag because ASP script is processed before the HTML

because ASP script is processed before the HTML statements.

statements.

27. What are Constants? How will you declare a 27. What are Constants? How will you declare a constant?

constant?

Constants have values that do not change during the Constants have values that do not change during the execution of the program. It can be declared using the execution of the program. It can be declared using the term CONST. (e.g.) Const pi = 3.143

term CONST. (e.g.) Const pi = 3.143 28. What are ARRAYS?

28. What are ARRAYS?

Arrays are variables that store items of similar Arrays are variables that store items of similar information.DIM ARRAY1(4)

information.DIM ARRAY1(4) (declares (declares an an array array with with thethe name array1 with 5 elements)

name array1 with 5 elements)

29. Arrays can be resized by using the keyword 29. Arrays can be resized by using the keyword REDIM

REDIM

30. What is the maximum size of an array? 30. What is the maximum size of an array? Up to 60 dimensions.

Up to 60 dimensions. ASP OBJECTS

ASP OBJECTS

31. Name the ASP Objects? 31. Name the ASP Objects? · Request Object · Request Object · Response Object · Response Object · Server Object · Server Object · Session Object · Session Object · Application Object · Application Object

32. What is Request Object? 32. What is Request Object?

Gets information from the user. It has five Gets information from the user. It has five

collections by which values can be accessed. They are: collections by which values can be accessed. They are: Querystring, Form, Cookies, Server Variables &

Querystring, Form, Cookies, Server Variables & ClientCertificate

ClientCertificate

33. What is Collection? 33. What is Collection?

Collection is a set of name/value pairs where the Collection is a set of name/value pairs where the information supplied by the client is stored. information supplied by the client is stored. 34. What is application Object?

(23)

Shares information among users of an application. Shares information among users of an application. Gives a notification when an application starts or Gives a notification when an application starts or ends.

ends.

35. What is Application-scope? 35. What is Application-scope?

Application-scope means that variables (and objects) Application-scope means that variables (and objects) can be accessed from any ASP pages that is part of the can be accessed from any ASP pages that is part of the application.

application.

36. How many global.asa files can an Application have? 36. How many global.asa files can an Application have? Only one global.asa file and it’s placed in the

Only one global.asa file and it’s placed in the virtual directory’s root.

virtual directory’s root.

37. What are the collections of Application Object? 37. What are the collections of Application Object? * Contents collection – contains all variables added * Contents collection – contains all variables added via scripts in global.asa.

via scripts in global.asa.

* Static collection – contains the names of all * Static collection – contains the names of all objects added via the <OBJECT> tag in global.asa. objects added via the <OBJECT> tag in global.asa.

ASP - Grade A ASP - Grade A 1. <% 1. <% strName="John Smith" strName="John Smith" %> %>

Referring to the above, if you want to pass the Referring to the above, if you want to pass the contents of

contents of

the strName variable in a hyperlink, which line of the strName variable in a hyperlink, which line of code would you

code would you use?

use?

A. This cannot be done. The anchor is on the client A. This cannot be done. The anchor is on the client and the

and the

variable is on the server. variable is on the server. B. B. href="Encode.asp?name=<%=Server.URLPathEncode(strName)%>">click href="Encode.asp?name=<%=Server.URLPathEncode(strName)%>">click here</a> here</a> C. <a href="Encode.asp?name=<%=strName%>">click C. <a href="Encode.asp?name=<%=strName%>">click here</a> here</a> D. <a D. <a href="Encode.asp?name=<%=Server.HTMLEncode(strName)%>">click href="Encode.asp?name=<%=Server.HTMLEncode(strName)%>">click here</a> here</a> E. <a E. <a href="Encode.asp?name=<%=Server.URLEncode(strName)%>">click href="Encode.asp?name=<%=Server.URLEncode(strName)%>">click here</a> here</a> 2. <%@ Language=VBScript %> 2. <%@ Language=VBScript %>

<%If false then> <%If false then>

<!-- #INCLUDE FILE="FunctionOne.inc"--> <!-- #INCLUDE FILE="FunctionOne.inc"--> <%Else>

(24)

<!-- #INCLUDE FILE="FunctionTwo.inc"--> <!-- #INCLUDE FILE="FunctionTwo.inc"--> <%End If>

<%End If>

What would the above code load? What would the above code load?

A. Only the FunctionTwo.inc file into the ASP page. A. Only the FunctionTwo.inc file into the ASP page. B. Both files, since Server Side Includes are

B. Both files, since Server Side Includes are processed before ASP interpreting.

processed before ASP interpreting.

C. Only the FunctionOne.inc file into the ASP page. C. Only the FunctionOne.inc file into the ASP page. D. Neither file, since Server Side Includes are D. Neither file, since Server Side Includes are processed before ASP interpreting.

processed before ASP interpreting.

E. Neither file, since the #INCLUDE statements are E. Neither file, since the #INCLUDE statements are commented out.

commented out.

3. <% Response.Redirect("

3. <% Response.Redirect(" http://www.sql.comhttp://www.sql.com") %>") %> What does the above code accomplish?

What does the above code accomplish?

A. It sends the browser the line of sample code, and A. It sends the browser the line of sample code, and the browser executes it.

the browser executes it. B. It sends the response to B. It sends the response to "

"http://www.matsystems.comhttp://www.matsystems.com" instead of to the" instead of to the Requesting browser.

Requesting browser.

C. It sends a redirection header back to the browser, C. It sends a redirection header back to the browser, and

and the the browser then browser then requests the requests the new new targettarget document.

document.

D. The redirection occurs on the server-side, and the D. The redirection occurs on the server-side, and the first response the browser gets is the head and body first response the browser gets is the head and body of the new target document.

of the new target document.

E. It causes the server to send a request to the E. It causes the server to send a request to the target URL and passes the response to the requesting target URL and passes the response to the requesting browser.

browser.

4. How are sessions maintained? 4. How are sessions maintained?

A. The browser sends a cookie to the server with each A. The browser sends a cookie to the server with each request.

request.

B. The browser sends a Querystring variable to the B. The browser sends a Querystring variable to the server with each request.

server with each request.

C. The browser sends a hidden Form variable to the C. The browser sends a hidden Form variable to the server with each request.

server with each request.

D. The browser sends a long variable to the server in D. The browser sends a long variable to the server in the BODY of each request.

the BODY of each request. E. None of the above. E. None of the above.

5. When does the application OnEnd event handler fire? 5. When does the application OnEnd event handler fire? A. After every request for an application document, A. After every request for an application document, since web servers are stateless servers.

since web servers are stateless servers.

B. As soon as there are no open connections to any B. As soon as there are no open connections to any application document.

application document.

C. When the web server is stopped in an orderly C. When the web server is stopped in an orderly fashion.

fashion.

D. Twenty minutes after the last request for a D. Twenty minutes after the last request for a document in the application.

document in the application.

E. When there are no application requests for the E. When there are no application requests for the

amount of time defined by the SessionTimeout variable. amount of time defined by the SessionTimeout variable. 6. How long is a SessionID guaranteed to be unique? 6. How long is a SessionID guaranteed to be unique?

(25)

A. It is unique for the web server, whether it is A. It is unique for the web server, whether it is restarted or not.

restarted or not.

B. Only until the web server is restarted. B. Only until the web server is restarted.

C. It is like a GUID in that it is for any web server C. It is like a GUID in that it is for any web server at any time.

at any time.

D. Only until the session expires, then it can be D. Only until the session expires, then it can be reissued to another client.

reissued to another client.

E. It is unique per client. A client cannot have two E. It is unique per client. A client cannot have two sessions with the same SessionID

sessions with the same SessionID

7.Which-code sample will report whether the client's 7.Which-code sample will report whether the client's browser supports cookies?

browser supports cookies? A. <% var objFSO = A. <% var objFSO = Server.CreateObject("Scripting.FileSystemObject") Server.CreateObject("Scripting.FileSystemObject") Response.Write objFSO.cookiesSupported Response.Write objFSO.cookiesSupported %> %>

B. You can only use JavaScript for this. B. You can only use JavaScript for this. C. <% var objFSO = C. <% var objFSO = Server.CreateObject("Scripting.FileSystemObject") Server.CreateObject("Scripting.FileSystemObject") Response.Write objFSO.cookies Response.Write objFSO.cookies %> %> D. <% var objBrowser = D. <% var objBrowser = Server.CreateObject("MSWC.BrowserType") Server.CreateObject("MSWC.BrowserType") Response.Write objBrowser.cookies Response.Write objBrowser.cookies %> %> E. <% var objBrowser = E. <% var objBrowser = Server.CreateObject("MSWC.BrowserType") Server.CreateObject("MSWC.BrowserType") Response.Write objBrowser.cookiesSupported Response.Write objBrowser.cookiesSupported %> %>

8. <input type=radio name=rbSex value="M">Male 8. <input type=radio name=rbSex value="M">Male

<Input type=radio name=rbSex value="F">Female <Input type=radio name=rbSex value="F">Female Referring to the above, which line of code would Referring to the above, which line of code would retrieve the selected radio button value?

retrieve the selected radio button value? A. For cnt=0 to rbSex.count - 1

A. For cnt=0 to rbSex.count - 1

If rbSex(cnt).value = selected Then If rbSex(cnt).value = selected Then

strSex = rbSex(cnt).value strSex = rbSex(cnt).value exit for exit for End If End If Next Next B. strSex = Request("rbSex").selected.value B. strSex = Request("rbSex").selected.value C. strSex = Request("rbSex") C. strSex = Request("rbSex") D. strSex = Request.rbSex.value D. strSex = Request.rbSex.value E. For Each value in rbSex

E. For Each value in rbSex If rbSex.selected = true If rbSex.selected = true strSex = value strSex = value exit for exit for Next Next

9. The FileSystemObject provides an object interface 9. The FileSystemObject provides an object interface to drives, directories, and files for which of the to drives, directories, and files for which of the following?

following?

A. Any local or mapped drive on either the server or A. Any local or mapped drive on either the server or

References

Related documents

AIM: How do photolysis and carbon fixation occur in the light-dependent and light-independent reactions of photosynthesis?... TASK: Complete Light-Dark GO Models #1 and #2 ONLY

Pitch Echo Mono, Stereo Line 6 Original. Added with

Understand the words and rest assured in hindi with example sentences and bundle you name that you getting word wise available procure the server.. We insure for we hope and please

Analizom upitnika upitnika UIQ-7 (utjecaj poremećaja funkcije mokraćnog mjehura na svakodnevni život) prije i nakon tri, šest i dvanaest mjeseci od operacijske

Using course web site report data, student grades, and redesigned course evaluations, we aimed to determine whether these modifications have led to increased interaction,

There are different models for different purposes, such as correlation models to create and evaluate a portfolio, and covariance models to forecast VaR on a daily basis for a

If you are interested to join our team, please send your resume indicating the position applied for, current/expected salary, passport sized photo to [email protected]..

It was important to develop a resource that could be used in workplace training to teach occupational health and safety competencies while taking into account the language and