What is meant by "Early Binding" and "Late Binding"? Which
is better?
Answer Posted / guest
Early binding and late binding refer to the method used to
bind an interface's properties and methods to an object
reference (variable). Early binding uses type library
information at design time to reference procedures, while
late binding handles this at run time. Late binding
handles this by interrogating the reference before each
call to insure that it supports a particular method. Since
every call to a late bound object actually requires two
calls ("Do you do this?" followed by "Okay, do it then"),
late binding is much less efficient than early binding.
Except where early binding is not supported (ASP,
scripting, etc.), late binding should only be used in very
special cases.
It is a common misconception that any code using the
CreateObject function instead of Set = New is using late
binding. This is not the case. The type declaration of
the object variable determines whether it is late or early
bound, as in the following:
Dim A As Foo
Dim B As Foo
Dim C As Object
Dim D As Object
Set A = New Foo 'Early Bound
Set B = CreateObject("FooLib.Foo") 'Early Bound
Set C = CreateObject("FooLib.Foo") 'Late Bound
Set D = New Foo 'Late Bound
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
i want to retrive data from one spead sheet to another UI (workbook). control will search cell by cell for each row and load the data in another workbook(UI).
What are the types of line styles available in Treeview Control?
How would you navigate between one document to another document
How to get freefile location in memory?
Can you create a tabletype of recordset in Jet - connected ODBC dbengine?
Why does everybody say I should save in TEXT not BINARY?
What is data control in vb?
How do I program the Novell NetWare API from VB?
How to use advanced data-bound controls.
How do I speed up control property access?
What is Mask Edit and why it is used?
How about Access 2.0 compatibility?
Does VB support pointers to functions?
Hi, I am USINg QTP tool for automation. Where VB Script have to use. I want to read a row from the table present in .Doc File and to paste in excel. Could you please assist me or give me the code to get it. I am new in this technology.
Differentiate between DAO,ADO and Adodc as in data access objects?