Solved

How to connect to Oracle and ExecuteOracleScalar in C#

Posted on 2008-06-20
2
1,285 Views
Last Modified: 2010-04-21
Well, once again C# just gets me in a tizzy.  Forgive me but I am used to VB.NET.  How in God's name do I create an Oracle connection and then ExecuteOracleScalar?  I've googled about 100 pages and have not found one example.  Nor is it in MSDN.  Nor is it in the help that comes with Visual Studio.  Apparently, it is 100 percent different from VB.NET.

Thanks in advance.
0
Comment
Question by:jonmclean2
[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
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 21834733
here is some sample code for a OleDBConnection (which can be done with Oracle also) and making a ExecuteScalar() calls
http://www.java2s.com/Tutorial/CSharp/0560__ADO.Net/OleDbCommandExecuteScalar.htm
0
 
LVL 1

Author Closing Comment

by:jonmclean2
ID: 31469317
Ah, thank you.  I was leaving out the cast and also the cmd.Connection = conn;
0

Featured Post

Industry Leaders: 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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

740 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