Solved

Connect Oracle to VB.NET

Posted on 2010-11-29
3
762 Views
Last Modified: 2012-05-10
I am new to Visual Basic.NET.
 I had installed Visual Studio 2010 on my machine. I have Oracle 10g as the database.
I need to connect the front end  Visual Basic to Oracle.

The Login to Oracle is "Scott"
Password is "tiger"
Database is "all_employees"

I have an employee table in  that Oracle database.  Table name := "Employee"
The fields are "Empno", "EmpName","Job_Title", "Salary".

I need to update the salary of all the employees to 5000 whose Job_Title is "CLERK".
Could some one please send me the entire code as to how to achieve that with VB.NET and Oracle.

Do I requre to install any special Oracle ODBC drivers / dll files to connect Oracle to VB.NET?

Thanks
0
Comment
Question by:vsuripeddi
3 Comments
 

Author Comment

by:vsuripeddi
Comment Utility
Please provide VB.NET code and Oracle drivers information
0
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
Comment Utility
here is connection string for oracle that I use:


Dim cs As String = "Data Source=[Data Source]; User ID=[User ID]; Password=[Password]; Incr Pool Size=[Incr Pool Size]; Decr Pool Size=[Decr Pool Size]; Max Pool Size=[Max Pool Size]; Validate Connection = [Validate Connection]; Connection Timeout=[Connection Timeout]; Connection Lifetime=[Connection Lifetime]; Pooling=[Pooling];"



dim DBConnection As OracleConnection

DBConnection.ConnectionString=cs

DBConnection.Open

Dim cmd As New OracleCommand("select sysdate as OraDate from dual", DBConnection)

cmd.CommandType = CommandType.Text

cmd.ExecuteNonQuery()

DBConnection.Close

Open in new window

0
 
LVL 76

Expert Comment

by:slightwv (䄆 Netminder)
Comment Utility
I suggest you use ODP.Net from Oracle as your data access provider.  There is sample code and examples on the site:

http://www.oracle.com/technetwork/topics/dotnet/index-085163.html
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now