Solved

Common Errors

Posted on 2006-11-28
4
174 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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now