?
Solved

Connect Oracle to VB.NET

Posted on 2010-11-29
3
Medium Priority
?
805 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 61

Accepted Solution

by:
HainKurt earned 2000 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 78

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video shows how to recover a database from a user managed backup
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

850 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