Solved

Common Errors

Posted on 2006-11-28
4
177 Views
Last Modified: 2010-04-30
So far, from my novice experience in programming VB I have learned that some of my biggest errors come from 'incorrect values linking to the database.  From your experiences, what are some of the things you have experienced as the top problems encountered in VB design.
0
Comment
Question by:al4629740
4 Comments
 
LVL 29

Accepted Solution

by:
Nightman earned 300 total points
ID: 18030340
1. Failure to check whether a recordset/object exists when before using it (Object variable or with block not set).
2. Failure to compile a project for repeated, upgradeable distribution with Binary comapatibility.
3. Iterating forwards through an indexed list deleting by index (array out of bounds).
4. Forgetting to destroy objects in memory, assuming (for some unknoen reason) that VB will clean up for you.
5. Not closing and destroying databse connection objects in memory.
6. Poor handling of null values.
7. Repeated re-use of shared source code instead of compiling into a single library.
8. And in team projects, failure to communicate properly with regards to change control over common source code/libraries.
9. Assuiming that the user would 'never to that'
...
0
 
LVL 9

Assisted Solution

by:dancebert
dancebert earned 100 total points
ID: 18030835
Assuming that the IsDate() function works as one would expect it to

? isdate("0221/01")
True
? IsDate("09-8453166")
True
? isdate("10/90")
True

0
 
LVL 15

Assisted Solution

by:cquinn
cquinn earned 50 total points
ID: 18036230
Users will tell you exactly what they want a system to do
Using an Int variable for a loop that can possibly happen > 32767 times
Declaring variable on a line assuming that all will be of the same type (the ones without as end up as variants) eg: Dim iLoop, iCount, iMax as Integer

0
 
LVL 44

Assisted Solution

by:Arthur_Wood
Arthur_Wood earned 50 total points
ID: 18036235
10. Failure to add Error Handling to EVERY procedure, religiously.
11. Failure to rename controls to be 'meaningful' (do not use the default names assigned by VB - TextBox1, TextBox2, Command1, Combo1, etc)

AW
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question