Home > Ask the Microsoft .Net Development Experts > Visual Basic .NET Questions & Answers > Problems using VB .NET with an Oracle database
Ask The Win Development Expert: Questions & Answers
EMAIL THIS

Problems using VB .NET with an Oracle database

Mark Belles EXPERT RESPONSE FROM: Mark Belles

Pose a Question
Other Win Development Categories
Meet all Win Development Experts
Become an Expert for this site


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


>
QUESTION POSED ON: 16 August 2004
I have to use VB .NET with my Oracle database. When I'm executing, I get an error:
"An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll"
Do you have any idea of what the problem may be and what I can do to rectify it?

>
EXPERT RESPONSE
I am not entirely familiar with database technologies, however it is my understanding that you can connect to the various database formats such as MS Access, MySQL, SQL, and Oracle using the default ODBC drivers and the appropriate data adapter found in the .NET framework or a third-party implementation. However, you are going to experience performance gains if you are using the correct drivers and clients to communicate with your database. The known clients that are shipped with the .NET framework are as follows (after a brief glance into the Data namespace revealed)

System.Data.Odbc.OdbcDataAdapter;
System.Data.OleDb.OleDbDataAdapter;
System.Data.SqlClient.SqlDataAdapter;
System.Data.OracleClient.OracleDataAdapter;

I would recommend making a reference to the System.Data.OracleClient.dll in your project and then use the OracleDataAdapter. From your original question it appears that you may be attempting to access the Oracle database using the OleDb classes or drivers, which I believe will throw all sorts of exceptions. Check your connection and connection string to ensure you have the correct format. If you are using the standard connection string dialog choose the appropriate driver (SQL, OLEDB, or Oracle) and then in code use the associated namespace to manipulate your data.

Without a more detailed exception trace or some sample code to take the question into greater depth in context it would be hard for me to advice you further.


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


RELATED CONTENT
VB.NET
Access VB .NET Windows control on client side
Converting floating values to byte form
Read data from parallel port
Converting EXE-files to VB components
Generating classes like we did in VB6
Manipulating text through VB.NET
Converting Windows applications to VB .NET
How to add a key to a listview item in VB.NET
Accessing .NET components from VBScript
How I can assign an untyped dataset to a typed dataset?

Visual Basic .NET
Access VB .NET Windows control on client side
Drop down list server control creates error message
Converting floating values to byte form
Datagrid issue: 'onselection' is not populating
Read data from parallel port
What is the use of these constructors?
Give me an ODBC connect, with SQL authentication
Converting EXE-files to VB components
Generating classes like we did in VB6
Manipulating text through VB.NET

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



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Windows Development - White Papers, News and Expert Advice
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and 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