Archive for the ‘VB’ Category

VB 6, COM, DCOM, Microsoft platform interview questions

VB 6, COM, DCOM, Microsoft platform interview questions

3 main differences between flexgrid control and dbgrid control

ActiveX and Types of ActiveX Components in VB

Advantage of ActiveX Dll over ActiveX Exe

Advantages of disconnected recordsets

Benefit of wrapping database calls into MTS transactions

Benefits of using MTS

Can database schema be changed with DAO, RDO or ADO?

Can you create a tabletype of recordset in Jet-connected ODBC database engine? Read more…

Categories: VB Tags:

ASP, ADO and IIS interview questions

ASP, ADO and IIS interview questions

This came in the mail from the reader who recently went through a job interview process. He didn’t mention the company name.
Why do you use Option Explicit?

What are the commonly used data types in VBScript?

What is a session object?

What are the three objects of ADO?

What are the lock-types available in ADO? Explain.

What are the cursor types available in ADO? Explain.

What is a COM component?

How do you register a COM component? Read more…

Categories: VB Tags:

COM interview questions

COM interview questions

What is IUnknown? What methods are provided by IUnknown? It is a generally good idea to have an answer for this question if you claim you know COM in your resume. Otherwise, you may consider your interview failed at this point. IUnknown is the base interface of COM. All other interfaces must derive directly or indirectly from IUnknown. There are three methods in that interface: AddRef, Release and QueryInterface.

What are the purposes of AddRef, Release and QueryInterface functions? AddRef increments reference count of the object, Release decrements reference counter of the object and QueryInterface obtains a pointer to the requested interface.

What should QueryInterface functions do if requested object was not found? Return E_NOINTERFACE and nullify its out parameter.

How can would you create an instance of the object in COM? Well, it all depends on your project. Start your answer from CoCreateInstance or CoCreateInstanceEx, explain the difference between them. If interviewer is still not satisfied, you’ll have to explain the whole kitchen behind the scenes, including a difference between local server and inproc server, meaning and mechanism of class factory, etc. You may also mention other methods of object creation like CoGetInstanceFromFile, but discussion will likely turn to discussion of monikers then. Read more…

Categories: VB Tags:

Basic VB interview questions

Basic VB interview questions

A reader sent these in noting that these questions were used in his company for interviewing prospective VB programmers.
How do you center a form?

Can I send keystrokes to a DOS application?

Convert an RGB value to a long, or a long to RGB.

Implement smooth scrolling for either text, graphics or controls across a form.

Implement some quick and easy encryption (can be something primitive).

4 different types of sorts: advantages and disadvantages.

Compute CRC32 checksum, write a quick piece of code that accepts the packet of data and returns the CRC.

How do you use the Mouse OFF event? Read more…

Categories: VB Tags:

Visual Basic

Visual Basic

How do you register a component? Expected answer: Compiling the component, running REGSVR32 MyDLL.dll

Name and explain the different compatibility types when creating a COM component. Expected answer: No Compatibility ? New GUID created, references from other components will not workProject Compatibility ? Default for a new component Binary Compatibility ? GUID does not change, references from other components will work

Why iss it important to use source control software for source code? Expected answer: Modification history.Code ownership: Multiple people can not modify the same code at the same time.

What two methods are called from the ObjectContext object to inform MTS that the transaction was successful or unsuccessful? Expected answer: SetComplete and SetAbort.

What is the tool used to configure the port range and protocols for DCOM communications? Expected answer: DCOMCONFIG.EXE

What does Option Explicit refer to? Expected answer: All variables must be declared before use. Their type is not required.

What are the different ways to Declare and Instantiate an object in Visual Basic 6? Expected answer: Dim obj as OBJ.CLASS with eitherSet obj = New OBJ.CLASS orSet obj = CreateObject(?OBJ.CLASS?) orSet obj = GetObject( ,? OBJ.CLASS?)orDim obj as New OBJ.CLASS Read more…

Categories: VB Tags: