Visual Basic Interview Questions & Answers


Q: – What is Spring ?

Spring is an open source framework created to address the complexity of enterprise application development. One of the chief advantages of the Spring framework is its layered architecture, which allows you to be selective about which of its components you use while also providing a cohesive framework for J2EE application development.

Q: – What are the advantages of Spring framework?

The advantages of Spring are as follows:

  • Spring has layered architecture. Use what you need and leave you don't need now.
  • Spring Enables POJO Programming. There is no behind the scene magic here. POJO programming enables continuous integration and testability.
  • Dependency Injection and Inversion of Control Simplifies JDBC
  • Open source and no vendor lock-in.

Q: -What is Bean Factory ?

A BeanFactory is like a factory class that contains a collection of beans. The BeanFactory holds Bean Definitions of multiple beans within itself and then instantiates the bean whenever asked for by clients.

Q: – I lost my source code. Can I Decompile my VB executable to get it back?

Yes, it can be Decompiled if you are using VB 3 or earlier. You can only get machine code from later versions.

Q: – Can I Run My VB Application EXE Without Installing?

Yes, if your target machine has the required files and your application does not require any other OCXs or DLLs. NT 4.0 SP 4 or higher, Win 2000, Win ME and Win XP have the required files. Your users can also get VB5 and VB6 runtime installations from Microsoft.

Q: – What are *.OCA Files Used For?

The OCA files are used as type library caches for OCXs.

Q: – Why shouldn't I rely on VB runtime regarding objects release?

VB takes care to release the memory used by any variable when it goes out of scope, nevertheless it's better to Set explicitely your objects to Nothing for the following reasons:
– It's a good programming techinique, this habitude could turn usefull if it happens you to program in C++.
– It's better to release resources when you don't need them anymore, without waiting they go out of scope, this is expecially true if the objects keep DB connections open.
– There are (yet ?) some ADO bugs that gives some problems (loss of information in the Err object) if you don't have set ADO objects explicitely to Nothing before raising an error.
– Close Recordsets and Connections objects before setting them to Nothing, or connection pooling won't work correctly.

Q: – Can I store Interface pointers in the SPM ?

No, you can't !! the SPM is unaware of Apartment marshaling issues.If you ask the SPM for an interface pointer while running in an aprtment that is different from the one where the interface pointer resides the SPM will blindly pass you the rough interface pointer without marshaling it, thus violating COM rules (and your app will randomly fail). Park the interface pointer in the GIT and park the GIT cookie in the SPM.

Q: – How do I use command line arguments with VB?

Use the command$() function

Submitted By:-Jai Kundu           Email-ID: –