473,473 Members | 4,257 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to correct the error when odbc Exception was unhandled?

1 New Member
How to correct the error when odbc Exception was unhandled?

Expand|Select|Wrap|Line Numbers
  1. Private Function search(ByVal username As String) As Boolean
  2.         ' Try
  3.         Dim Sql As String
  4.         Sql = "Select * from login where UserName='" & username & "'"
  5.         Dim objdataAdapter As New OdbcDataAdapter(Sql, objconn)
  6.         Dim objDataSet As New DataSet
  7.         objdataAdapter.Fill(objDataSet, ("Login"))
  8.         Dim objdataview As DataView
  9.         objdataview = New DataView(objDataSet.Tables("Login"))
  10.         If objdataview.Count > 0 Then
  11.             Return True
  12.         Else
  13.             Return False
  14.         End If
  15.         'Catch ex As Exception
  16.         '  MsgBox(ex.Message)
  17.         ' End Try
  18.     End Function
  19.  
  20. End Class
Oct 26 '12 #1
3 3314
PsychoCoder
465 Recognized Expert Moderator Contributor
Why not start with giving more information about what's going wrong with the code you've provided
Oct 26 '12 #2
Frinavale
9,735 Recognized Expert Moderator Expert
You have commented out the code that will handle the exception and display the message.

Could you please explain what error you are seeing? There are several different odbc exceptions.

It is good practice to only catch the exceptions that you can deal with.

-Frinny
Oct 26 '12 #3
tsanalista
11 New Member
Show Message Error brother....
Nov 20 '12 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Lou | last post by:
I can't track down this exception. If anyone has any ideas, please pass them on. I've been trying to kill this bug for days now. An unhandled exception of type 'System.NullReferenceException'...
1
by: GPBSOFT | last post by:
I am Italian developer, escuse me for my bad English I have a problem with ODBC. I must link to a database from Visual FoxPro, I have installed Windows XP Professional with service pack 2. When I...
5
by: Peter Steele | last post by:
We have an application that when it runs in the IDE in debug mode an unhandled exception is occurring in a system header file associated with STL stirngs. The actual statement that crashes is ...
2
by: David Hearn | last post by:
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Description: An unhandled exception occurred during the execution of the current...
0
by: Joshua V. | last post by:
We are trying to implement Windows Error Reporting from within our VB.Net application. Basically we want to replace the standard unhandled exception message we use with the Windows Error Reporting...
2
by: SBlain | last post by:
I have an application which runs in our development enviroment which is Windows Server 2003 with the DOT.NET 1.1 framework. OUr production eviroment is W2K Server with SP4. We have other ASP.NET...
0
by: ravescar | last post by:
I am currently working on an generic error collection mechanism in ASP.NET2.0 written using C# that can catch unhandled exception on a web application in application level. it automatically save an...
0
by: K S | last post by:
All, I am getting the following error when I tried to deploy my webpage (Release Version) on Windows Server 2003. The below error occurs when I try to access the webservice. PS: I can access...
9
by: shahoo | last post by:
Hi, As you know in Java, when a method is able to throw an exception the programmer has to handle the exception otherwise the program will not compile. Is there anyway to do so in C#. I mean...
10
by: Digital Puer | last post by:
Sorry for the rudimentary question. I found the following posting online and did not know the answer myself. "Reminds me of a time I had a phone interview concerning a C++ job. Didn't help...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.