Home > Microsoft .Net Development Tips > ARCHIVE: Tips & Tricks > Getting A Hold on Error Messages
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ARCHIVE: TIPS & TRICKS

Getting A Hold on Error Messages


Laura Moloney
12.19.2000
Rating: -4.43- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Getting A Hold on Error Messages
Laura Moloney

Reader Laura Moloney tells how she figured out the answer to a particularly vexing problem, and gives some kudos to SearchVB.com and the rest of the VB community in the process.

I started working with Visual Basic about 6 months ago when I had to pick up an application that was written by someone else and was not meeting the functional requirements of the user. So I had an opportunity to learn as I went, relying heavily on the Internet and VB sites like SearchVB that offered assistance where needed (many of my favorites were recommended by SearchVB). My next foray was to build a back-end job process logging application where a user would initiate several back-end tasks via a VB application, for example run awk to format data, use Oracle's SQL Loader to load the data to temporary Oracle tables, and then run Oracle PL/SQL code to validate and post the data to the production databases.

Throughout this process I needed to ensure that start/stop times and error messages from each step we...

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
ARCHIVE: Tips & Tricks
SearchVB wants your tips
Find out what VS.NET modules are installed
Retrieving icons from an EXE-file
Toggling Boolean values
VS.NET multiple tabbed windows
Set the value of a DataField in code behind
Easy grid design
Open using last Visual Studio.NET layout
Save development time by using inherited forms
Reusing code in VS.NET

Visual Basic 6 programming language
VB code download home page
VB code: Windows operations downloads
VB code: System control downloads
VB code: String manipulation downloads
SearchVB.com's Top 10 Downloads of Fall 2006
Choosing VB.NET or C# Learning Guide
Recent VBCode.com downloads, December 2006
Quiz: What do you know about VB 6 migration?
Answers: What do you know about VB 6 migration?
SearchVB.com podcast: What readers said about the state of VB

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


re captured in a central database table. This required me to build a console application that would manage each step of the process. Again this is where the Internet and the VB community as a whole played a significant part in helping me build the application.

One area where I could not find an answer from the VB community was in capturing the system responses to commands run in the console window. For example if I were executing an AWK process and the process could not find a file, the system would return a message 'file not found' to the console window. I needed to be able to capture that message. After many failed attempts, I was able to find the resolution to the problem.

The procedure below opens a console window via the EXECCMD function, runs an AWK process, waits for its completion, and then reads the console screen buffer twice - the first time to get the console buffer contents as a whole, and the next time to get a line at a time. I hope others find this useful!
------------------------------------------------------



Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts