Exception Error Handling Implementation in MySQL/VB.NET Windows Database Applications

 
Thread Tools Search this Thread
Top Forums Web Development MySQL DevZone RSS Exception Error Handling Implementation in MySQL/VB.NET Windows Database Applications
# 1  
Old 02-10-2009
Exception Error Handling Implementation in MySQL/VB.NET Windows Database Applications

Error handling implementation in Windows database applications is a must for any Application Developer today. The main idea of error handling is to avoid application crashes by finding out the occurred errors and fixing them. Different programming languages have different ways of implementing error handling. Microsoft Visual Basic .NET (VB.NET) is the most common programming language for developing windows database applications today. VB.NET codes are provided in many websites, books and materials without error handling implementation. In this article I would like to introduce you to the basics of error handling implementation in MySQL/VB.NET windows database applications. I'll be covering structured exception error handling, which was introduced for the first time in VB.NET 2002. I will also go over the latest technologies of disposing unmanaged recourses in .NET Framework with the Using statement. To write exception errors to a log text file, a generic procedure will be developed while MySQL data is loading, inserting, updating and deleting.

More...
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Programming

Exception Handling C++

Hello All, I have a question ....which I am totally confused about! If I have a fxn foo in a program which returns a logical value. But it has a posssiblity to throw some exception. Now my exception handler returns a value as a string stating why the exception occured. But my... (1 Reply)
Discussion started by: mind@work
1 Replies

2. Shell Programming and Scripting

Exception handling

Sometimes when I try to use curl to upload to an ftp server, I get the message: $curl -T file.wmv ftp.eu.filesonic.com --user user:password curl: (8) Got a 421 ftp-server response when 220 was expected How do I get the script to try again if I get the message curl: (8)? (2 Replies)
Discussion started by: locoroco
2 Replies

3. Programming

Advanced Exception Handling in C++

Hi Friend, Could you please provide me with some tutorial for Advanced Exception handling in C++, mainly set_terminate() and set_unexpected() functions? Please find the details below: OS: Unix Compiler: gcc. Thanks. :) Awesome001 (0 Replies)
Discussion started by: awesome001
0 Replies

4. Shell Programming and Scripting

Exception Handling

Hi, I have written a script to load csv files into a mysql database, however, i would like for the shell script to exit in the event of an error (missing file, load error etc.) - currently if an error is encountered the next statement is processed - This is how i am loading the csv scripts ... (5 Replies)
Discussion started by: bertpereira
5 Replies

5. Shell Programming and Scripting

Exception-handling in Shell programs

Hi all, I am writing a set of scripts and some of these are nested within others. I want to be able to execute a single high-level script at the command-line, which in turn may invoke other scripts as required, and when a failure occurs in any of the nested scripts, I want to be able to track... (2 Replies)
Discussion started by: chaitu_inmage
2 Replies

6. Programming

Linux g++ 2.95.3 exception handling

Anybody happen to be familiar with any deficiencies with g++ 2.95.3 regarding exception handling, specifically in multi-threaded / multi-module (shared library) based applications? I'm seeing behavior where thrown exceptions are not caught, but basically ignored causing the application to... (0 Replies)
Discussion started by: earl
0 Replies

7. UNIX for Advanced & Expert Users

exception handling

Does exception handling exist in any UNIX enviornment? I develop on Windows MSVC++ land and need to port to UNIX. (1 Reply)
Discussion started by: RichardS
1 Replies
Login or Register to Ask a Question
XtAppGetErrorDatabaseText()											       XtAppGetErrorDatabaseText()

Name
  XtAppGetErrorDatabaseText - get the text of a named message from the error database.

Synopsis
  void XtAppGetErrorDatabaseText(app_context, name, type, class, default, buffer_return, nbytes, database)
	 XtAppContext app_context;
	 String name, type, class;
	 String default;
	 String buffer_return;
	 int nbytes;
	 XrmDatabase database;

Inputs
  app_context
	    Specifies the application context.

  name	    Specifies the name or general kind of the message.

  type	    Specifies the type or detailed name of the message.

  class     Specifies the resource class of the error message.

  default   Specifies the default message to use if an error database entry is not found.

  nbytes    Specifies the size of buffer_return in bytes.

  database  Specifies the database to be used, or NULL if the application's database is to be used.

Outputs
  buffer_return
	    Specifies the buffer into which the error message is to be returned.

Description
  XtAppGetErrorDatabaseText()  looks  up the message named by name, type, and class in database or in the database returned by XtAppGetError-
  Database() for app_context if database is NULL.  If such a message is found, it is stored into  buffer_return,  otherwise  the  message  in
  default is stored into buffer_return.

  The  resource  name of the message is formed by concatenating name and type with a single "." between them.  The resource class of the mes-
  sage is class if it already contains a ".", or otherwise is formed by concatenating class with  itself  with	a  single  "."	 between  the
  strings.

Usage
  You should not need to call XtAppGetErrorDatabaseText() unless you are writing a customized high-level error or warning handler.

  Because the Intrinsics do not support the customization and internationalization of error messages very well, some applications may want to
  read a customized error database (found with XtResolvePathname() or named by an application resource, for example) and  provide  customized
  error and warning handlers that call XtAppGetErrorDatabaseText() specifying this custom database explicitly.

  While the X Toolkit specification permits individual error databases for each application context, most implementations will only support a
  single database.  In the MIT implementation, the error database file is /usr/lib/X11/XtErrorDB.

See Also
  XtAppGetErrorDatabase(1),
  XtErrorMsgHandler(2).

Xt - Error Handling												       XtAppGetErrorDatabaseText()