VB Interview Questions - Part IV

Wednesday, November 28, 2007

  • What are the three main differences between flexgrid control and dbgrid(Data bound Grid) control
    The Microsoft FlexGrid (MSFlexGrid) control displays and operates on tabular data. It allows complete flexibility to sort, merge, and format tables containing strings and pictures. When bound to a Data control, MSFlexGrid displays read-only data.Adaptation to existing Visual Basic code for the data-bound grid (DBGrid).

    Dbgrid is A spreadsheet-like bound control that displays a series of rows and columns representing records and fields from a Recordset object.

    The data grids are bound controls; that is, they require a data source that actually connects to a database and retrieves their data. And it seems that the root of the problem with DBGrid is that there's no data source that can be readily included along with the DBGrid control.In Visual Basic, the solution is simply to include the Data Control on the same form as DBGrid. But the Data Control is an intrinsic control; it's unavailable to anything outside of the Visual Basic environment itself. and VB 6.0 has a new set of data controls (DataGrid, DataList, DataCombo, MSHFlexGrid, MSFlexGrid) that once again are bound controls. Unlike DBGrid, though, they support OLE DB, and therefore rely on the an ADO Data Source (and in particular the ActiveX Data Objects Data Control, or ADO DC) for data access. Unlike the Data Control, the ADODC is a custom control (that is, an .OCX) that can be added to any project. In short, if you add ADO DC to your project along with theDataGrid control.
  • ActiveX and Types of ActiveX Components in VB ?
    Standard EXE
    ActiveX EXE
    ActiveX DLL
    ActiveX document
    ActiveX Control
  • What is difference between inprocess and out of process ?
    An in-process component is implemented as a DLL, and runs in the same process space as its client app, enabling the most efficient communication between client and component.Each client app that uses the component starts a new instance of it.
    An out of process component is implemented as an EXE, and unlike a dll, runs in its own process space. As a result, exe's are slower then dll'sbecause communications between client and component must be marshalled across process boundaries. A single instance of an out of process component can service many clients.
  • Advantage of ActiveX Dll over Active Exe ?

    ACTIVEX DLL:An in-process component, or ActiveX DLL, runs in another application’s process. In-process components are used by applications or other in-process components. this allows you to wrap up common functionality (like an ActiveX Exe).

    ACTIVEX EXE:An out-of-process component, or ActiveX EXE, runs in its own address space. The client is usually an application running in another process.The code running in an ActiveX Exe is running in a separate process space. You would usually use this in N-Tier programming.

    An ActiveX EXE runs out of process while an ActiveX DLL runs in the same process space as VB app. Also, and ActiveX EXE can be run independent of your application if desired.


Post a Comment


About This Blog


  © Blogger template The Professional Template II by Ourblogtemplates.com 2009

Back to TOP