Jump to content

Oracle?

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
Anyone ever connected to Oracle from C#? How is this done?

#2
Crane

Crane

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 398 posts
You will need to use ODBC connection to do this. I don't have any tutorials or code examples to give you.

#3
brackett

brackett

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
Oracle has a .NET client, I think. If not, you should use OleDb. ODBC should be your last choice.

#4
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
I'm not sure what OleDb is. I went ahead and created a connection from ODBC but now you say I should use it as a last choice, why?

I've read several times that the microsoft oracle client is way to slow: http://msdn.microsof...racleclient.asp

So I'm now left with OleDb, can you explain this?

#5
brackett

brackett

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts

Lop said:

I'm not sure what OleDb is. I went ahead and created a connection from ODBC but now you say I should use it as a last choice, why?

I've read several times that the microsoft oracle client is way to slow: http://msdn.microsof...racleclient.asp

So I'm now left with OleDb, can you explain this?

There's an actual Oracle provided .NET client called ODP.NET - that's likely to be the fastest.

OleDb is the successor to ODBC, and is the preffered way of connecting to non-native clients. You, of course, still need an OleDb driver for your particular database server (Oracle, in this case). You could use Microsoft''s Oracle OleDb driver, but if you install the Oracle Client Tools, you can use Oracle's as well.

Programattically, the main difference is that there are no DSN's with OleDb and you use a different namespace. Use the System.Data.OleDb namespace, and get a connection string from connectionstrings.com and you should be all set.

Of course, I actually recommend using the ODP.NET client, but OleDb is good to know about anyway.

#6
Lop

Lop

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,172 posts
I'm just now doing more work on this project with Oracle. None of these methods (other than ODBC) will work on Oracle earlier than 8.1.7.....

#7
Ronin

Ronin

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 309 posts
Use ODBC - you won't notice the difference in speed.

#8
Guest_Jordan_*

Guest_Jordan_*
  • Guests
I've used ODBC connection to oracle before and it isn't that slow. You probably will not notice much of a difference for small scale applications.