Results 1 to 7 of 7

Thread: VB Questions

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2002
    Posts
    1

    VB Questions

    This week i got one interview with VB position...i'm a new graduate, i would like to know which questions they usually ask for new people like me, if anyone knows please help thanks.
    if you got the question please answer them, thanks(because i dont know the answer)

    Also I got a few questions, please answer if you know, thanks

    1) What is COM stand for? And what COM do? and when do u use COM?
    2) What are ADO and DAO stand for? What's difference between ADO and DAO?
    3)what's MDI form mean? and when do u use it?
    4)when do u use class module?

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    3) MDI = Multiple Document Interface

    this is when you're programming 1 "Main" window and a bunch of "child" windows.

    this lets you easily make a program like word, where the user opens multiple word documents at once and edits them individually.

    need more explanation?
    ______________

  3. #3
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577
    class's are nice features, for a ( obviously ) beginner like you and class is just like a TYPE declaration but ALOT more advanced and more powerful, allows to have subs/functions, types, properties

    example

    VB Code:
    1. type PersonDetail
    2.  Name as string
    3.  Age as integer
    4. end Type

    to use that you type

    dim i as PersonDetail
    i.Name= "Fred"
    i.Age = 42

    or a class version called 'PersonDetails'

    VB Code:
    1. Dim l_Name As String
    2. Dim l_Age As Integer
    3.  
    4. Public Property Get Age() As Integer
    5.     Age = l_Age
    6. End Property
    7.  
    8. Public Property Let Age(ByVal NewAge As Integer)
    9.     If NewAge > 110 Then NewAge = 110
    10.     If NewAge < 1 Then NewAge = 1
    11.    
    12.     l_Age = NewAge
    13. End Property
    14.  
    15. Public Property Get Name() As String
    16.     Name = l_Name
    17. End Property
    18. Public Property Let Name(ByVal NewName As String)
    19.     l_Name = NewName
    20. End Property

    and to use this, on your form code type
    dim i as PersonDetails
    set i = new PersonDetails

    i.Name = "Fred"
    i.Age = 150


    as you can see classes are much more useful, because the Age Property( Get means return value, Let means Set value ) can check for errors, as in this case the age cant be 150 and will be set to 110

    I suggest you learn more standard VB before going into classes, they not newbie friendle IMO

  4. #4
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577
    DOA and ADO, cant remember there names but something like ActiveX Data O... umm brain gone dead.

    anyway the difference, just two methods to access databases made by like MS ACCESS

    as usual, theres an easy way and a harder way, DOA is the easier way and ADO is the hard way because its more powerful, this is the method MS are going towards. Theres lots of tutorials explaining about database access, check www.vbworld.com , they have some easy to understand tutorials

  5. #5
    Fanatic Member Geespot's Avatar
    Join Date
    Oct 2001
    Location
    Birmingham, UK
    Posts
    577
    Component Object Model (COM)

    you use these to extend the functionality of your program, and they made by compiling a class into a DLL

    basically, you can load externel dll's made by other developers and import them into your project and use there fucntions. Great example of this is the MS Script Control.
    You can either add the control to your form but that will require it needed when you come to package and development ( creating a setup program ). Or you can reference the MS Script dll file, by Projects>References
    and call its functions by

    dim i as MSScriptControl.

    but doing so this way requires you to know what procedures are available to you and how to use them


    Hope i made sense on my explainations

  6. #6
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    i think dao = data access object
    ______________

  7. #7
    Junior Member
    Join Date
    Jan 2002
    Posts
    16
    DAO = Data Access Objects, ADO = ActiveX Data Objects

    ADO objects provide you with the fastest, easiest and most productive means for accessing all kinds of data sources. The ADO model strives to expose everything that the underlying data provider can do, while still adding value by giving you shortcuts for common operations.

    DAO provide a framework for using code to create and manipulate databases. DAO supplies a hierarchical set of objects that use the Microsoft Jet database engine to access data and database structure in:
    Microsoft Jet (.MDB) databases
    ODBC data sources, using an ODBC driver
    Installable ISAM databases, such as dBASE®, Paradox™ and Microsoft FoxPro which the database engine can read directly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width