Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Connect Oracle to VB.NET

Posted on 2010-11-29
3
Medium Priority
?
801 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Author Comment

by:vsuripeddi
ID: 34230483
Please provide VB.NET code and Oracle drivers information
0
 
LVL 60

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 77

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

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
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.  …
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

636 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