VB 81-90

Embed Size (px)

Citation preview

  • 7/28/2019 VB 81-90

    1/3

    Q81. Explain differences between DDE and OLE.

    Dynamic data exchange(DDE) :

    Provide a way to communicate two applications to set up a very simple conversion between each other, withone feeling data into a present area of the other.

    Object linking and embedding(OLE):

    Provide drag and drop data from one application right into another as like dropping a excel graph right into theword document.

    DDE is just too constructing not robust enough and too difficult for the average programmer to set up, let aloneto let the average user loose on. But OLE is introduced by the way to provide user to drag and drop date fromone application right into another. So it is robust.

    Q82. State difference between ADO and RDO.

    (i) ADO is a COM wrapper of OLE DB that facilitates writing data access applications. OLE DBproviders can access data from a variety of data sources and is not limited to SQL queries toretrieve data but rather can use queries as defined in the provider.

    --- RDO is the COM wrapper of ODBC. ODBC, a C-based API, allows general-purpose(heterogeneous) data access. However, RDO relies on SQL as the command language to accessdata.

    (ii) It is the latest data access technology.

    ---It is found with older version of VB.

    (iii) It can access both relational and non-relational database.

    ---It is used in conditions when the database is outside the current pc. It can access only relationaldatabase.

    Q83. What is the difference between ado, rdo and dao?

    ADO is active x data object. It is used to access database with the help of data controls and objects as well. it isan extended form of RDO and DAO.

    RDO is remote data object which is used to access server site data. data in this case reside on the sql server.and we use sql queries to access data. in this we write a sql command and then sql server processes it andgives back the result.

    DAO is data access object. it is used to access data with the help of program and some data controls. itprovides an extension to data controls and data bound controls. DAO helps in accessing data with various

    conditions or queries.

    Q84. Explain different layers in VB applications.

    The different layers in VB applications are

    1) User interface: User interface layer is the topmost layer wherein all the users interaction iscompleted. This layer is directly dependent on the data interface. This layer is almost entirelynonreusable and is completely contained within the application boundary.

    2) Data interface: This layer is where all data is contained or manipulated in the memory of computerThis layer directly supports the user interface and is directly dependent on the transaction interface.This layer is mostly nonreusable and is contained completely within the application boundary.

    3) Transaction interface: This layer is where all transaction based processing of data occurs. This layerco-ordinates all permanent storage of data, either through file or database access. This layer supports

  • 7/28/2019 VB 81-90

    2/3

    the data interface and it is dependent on the external access interface. This layer may be reusable andmay extend the application boundary.

    Q85. What do you mean by API?

    API is a rich set of functions for accomplishing common tasks. API functions are stored in DLL files ("DynamicLink Libraries"; sometimes called libraries or libs).

    Q86. Mouse related API function.

    clip cursor:- This function configures the cursor to a rectangular area on the screen.

    Create cursor:- This function creates a cursor haring the specified size, bit position, & not spot.

    Get cursor pos:- This function retrieves the cursors position in screen coordinate.

    Get cursor:- This function retrieves the handle to the current cursor.

    Load curser:- This function loads a cursor resource.

    Q87. Keyboard related API function:

    Activate keyboard layout: This function sets the input local identifier, formally called the keyboard layouthandle, for the system.

    Enable window:- This function enables or disables mouse and keyboard input to the specified window.

    Get focus:- This function retrieves the handle to the keyboard focus Windows associated with thread that calledthe function.

    Get keyboard layout:- This function retrieves the active keyboard layout for a specified thread.

    Set focus:- This function sets the keyboard focus to the specified window.

    Q88. What is a record set? What are its types? Explain.

    Ans:

    A recordset is a data structure that consists of a group of database records, and can either come from a basetable or as the result of a query to the table.

    Types of Recordsets in Visual Basic

    A resultset returned from a database server as a result of the execution of an SQL statement can be stored in aRecordset object for further manipulation. In other words, a Recordset object can manipulate data returned bya provider. All Recordset objects consists of records (rows) and fields (columns).

    There are 4 types of recordsets

    Dynamic recordsets

    A dynamic recordset allows viewing the result of additions, changes and deletion by other users. It allows alltypes of movements on a Recordset, such as scrolling through the Records in the forward and reverse direction.

    Keyset recordsets

    The Keyset recordset is same as Dynamic recordset but prevents seeing of changes by the other users.

    Static Recordset

    Provides the static copy of a set of records to find data or generate reports. Allows Scrolling through the

    recordset. Additions, changes or deletions by other users are not visible.

    Forward only Recordset

  • 7/28/2019 VB 81-90

    3/3

    Behaves identical to a static Recordset and allows forward only scrolling. This improves performance insituations where you need to make a single pass through a recordset. We can create any of the above types ofrecordsets by setting the required value in the Cursor type property of the recordset object after initializing therecordset object

    Q89. What is record set property?

    Record sets are objects that represent collection of records from one or more tables. In database programming,record sets are the equivalent of variables in regular programming. We cannot access the tables of a databasedirectly. The only way to view or manipulate records is via record set objects. A record sets is constructed ofcolumns and rows and is similar to a table, but it can contain data from manipulate tabled.

    To access the contents of the record set we use its properties and methods:-

    a) The field values of the current record can be accessed via the fields objects of the record set. We accessindividual fields through the fields name or through the fields position in the table.

    As like,

    Book tittle= Data1.recordset.fields(0)

    Book tittle= Data1.recordset.fields(title)

    b) The number of rows in the record set of the data data control is:

    data1.record set.record control and the number of columns in the same record set of the data1 data control isdata1.recordset.fields.count.

    Q90. Difference between dynaset and snapshot record set?

    Dynaset are updated every time user changes the database and changes they make to the correspondingrecord set are reflected in the in designing table. Snapshots are static views of the same data. A snapshotcontains the records requested. The snapshot was generated and changes made to the order laying table arenot reflected in snapshots.