|
-
May 28th, 2002, 03:01 PM
#1
Thread Starter
New Member
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?
-
May 28th, 2002, 03:05 PM
#2
Hyperactive Member
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?
-
May 28th, 2002, 05:55 PM
#3
Fanatic Member
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:
type PersonDetail
Name as string
Age as integer
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:
Dim l_Name As String
Dim l_Age As Integer
Public Property Get Age() As Integer
Age = l_Age
End Property
Public Property Let Age(ByVal NewAge As Integer)
If NewAge > 110 Then NewAge = 110
If NewAge < 1 Then NewAge = 1
l_Age = NewAge
End Property
Public Property Get Name() As String
Name = l_Name
End Property
Public Property Let Name(ByVal NewName As String)
l_Name = NewName
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
-
May 28th, 2002, 06:03 PM
#4
Fanatic Member
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
-
May 28th, 2002, 06:11 PM
#5
Fanatic Member
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
-
May 28th, 2002, 08:26 PM
#6
Hyperactive Member
i think dao = data access object
-
May 29th, 2002, 02:45 PM
#7
Junior Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|