Technology Software

Visual Basic Tips

    Database Access

    • Avoid keeping an open database connection throughout the execution of your program. Visual Basic was designed to make a connection to a database, perform the interaction and then disconnect. Also, use stored procedures for inserts, updates and deletes because they do not have to be interpreted by the Visual Basic compiler; therefore, they execute much faster and decrease network traffic.

    Error Handling

    • Handle errors with a try/catch loop. Every function in a program could potentially generate an error; therefore, error handling is essential. Visual Basic 6 programmers typically use the "On Error Goto" method for handling errors. If an error occurs, the code skips to the "Goto" designated area and executes those commands. The try/catch code implemented in Visual Basic 7 (.NET) is noticeably faster than the "Goto" error handling method.

    Performance Improvements

    • Turn on "Option Explicit" to force the declaration of variables before they are used and "Option Strict" to prevent the implicit conversions of data types. This forces Visual Basic to perform type validation at compile time and thus increases performance at the time of program execution. Another tip that goes hand in hand with this is to use early binding. Early binding will prevent data type validation and coercion when the program executes, thus creating a faster program.

    .NET Framework

    • Study the .NET Framework and get familiar with all the built-in functions. Visual Basic .NET has a plethora of functions and classes available from the .NET Framework. Don't reinvent the wheel. Make use of this foundation of code that already exists for you.

SHARE
RELATED POSTS on "Technology"
local area network (LAN)
local area network (LAN)
How to Make Watermarks
How to Make Watermarks
How to Convert RTF to Doc
How to Convert RTF to Doc
How to Insert a Check Box in Word 2007
How to Insert a Check Box in Word 2007
How to Digital Scrapbook With Adobe Photoshop
How to Digital Scrapbook With Adobe Photoshop
RiT PatchView: Designing Your Own Personal Network With Technicians' Assisting in the Performance
RiT PatchView: Designing Your Own Personal Network With Technicians' Assisting in the Performance
Best Things About Software Development Services In India
Best Things About Software Development Services In India
Diwali Festival New Year Offer For School Management System
Diwali Festival New Year Offer For School Management System
How to Edit Pictures to Make Teeth Whiter
How to Edit Pictures to Make Teeth Whiter
3 Quick Fix Solutions to Common DVD Driver Issues
3 Quick Fix Solutions to Common DVD Driver Issues
How to Make a Java Game With NetBeans
How to Make a Java Game With NetBeans
Convert Offline EDB to PST When Exchange Server Crashed
Convert Offline EDB to PST When Exchange Server Crashed
How to Compress BMP Files
How to Compress BMP Files
How to View Two PowerPoint 2007 Presentations in Sync
How to View Two PowerPoint 2007 Presentations in Sync
How to Convert AVI to MPEG2 in Linux
How to Convert AVI to MPEG2 in Linux
xinetd
xinetd
How to Design a Corporate Enterprise Email System
How to Design a Corporate Enterprise Email System
Solving Complex Data Migration Problems With ET Tools
Solving Complex Data Migration Problems With ET Tools
Web Development Being Powered by Ajax Programming!
Web Development Being Powered by Ajax Programming!
Biztalk Server Deployment A Challenging Task For Deploying Over A Remote Account
Biztalk Server Deployment A Challenging Task For Deploying Over A Remote Account
Great Plains Small Business Financials Upgrade Overview For Consultant
Great Plains Small Business Financials Upgrade Overview For Consultant
Choosing The Right Mobile Application Development Platforms: Tips And Guidelines
Choosing The Right Mobile Application Development Platforms: Tips And Guidelines
Taking A Closer Look At SugarSynch
Taking A Closer Look At SugarSynch
Online Scheduling Software- How Online Scheduling Software Can Revolutionize Your Business
Online Scheduling Software- How Online Scheduling Software Can Revolutionize Your Business

Leave Your Reply

*