Solved

Common Errors

Posted on 2006-11-28
4
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

739 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