?
Solved

Connect Oracle to VB.NET

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

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
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 copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Suggested Courses

743 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