Solved

Connect Oracle to VB.NET

Posted on 2010-11-29
3
773 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
ID: 34230483
Please provide VB.NET code and Oracle drivers information
0
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 34230597
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)
ID: 34231266
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to recover a database from a user managed backup
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

816 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

9 Experts available now in Live!

Get 1:1 Help Now