[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1355
  • Last Modified:

How to connect to Oracle and ExecuteOracleScalar in C#

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
jonmclean2
Asked:
jonmclean2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
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
 
jonmclean2Author Commented:
Ah, thank you.  I was leaving out the cast and also the cmd.Connection = conn;
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now