April 24, 2024, 10:53:26 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Oracle 10g\11g Database Connection

Started by Michael42, January 02, 2009, 11:39:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Michael42

Hello,

Does anyone use or know of a driver to connect to an Oracle 10g\11g database without using ODBC?

Hoping for a .DLL that could be called to do this.


Thanks,

Michael

J B Wood (Zumwalt)

January 05, 2009, 10:25:26 AM #1 Last Edit: January 05, 2009, 11:18:37 AM by Jonathan (zumwalt) Wood
I am downloading 11g now to install and take a look at it, ODBC might be the only way since any native support would require a wrapper to be written.
I am not sure how complicated the wrapper would be.

Edit: 1/5/09 - 12:11 PM CST
Oracle 11g supports C++ with VS 2003/2005 managed extensions, that said the header files exist in some install folder from what I have read, so I am installing Oracle 11g now that I have it downloaded so I can find those files.
Typically speaking where there is a header, there is a way. They supply 7 different DLL's with the software which are supposed to be used when writing custom Oracle applications with VC++ 2003/2005, looks like they are all STDCALL in nature and EBasic supports using STDCALL right out of the box, all you have to do is write an interface to the public methods in the DLL. Going to play with this some more and post my findings for you, but I seriously suspect that it is doable. One thing to note though, no one else has done it with any other 3rd party compiler (been googling this for a while to find something that already exists) the only thing that I did find was some chap created an OraLib that is a very basic interface to version 8.x of Oracle and hasn't updated that code since 2002, so 6+ years of nothingness out there on this type of request :)

That or I am blind in google, which could easily be the case, I don't read Japanese.

Michael

Jonathan,

Thanks for the post.  I'll do likewise if I figure it out.

BTW, I have a technique I use in batch files and the like that works now.  Basically you call SQLPlus from your program and have it run the SQL you want and dump the output (spool) to a text file that you can read in and what you wish.  With eBasic you could probably grab StdOut or similar too I bet.

I have been doing this technique for years.

Look on my website under scripts fro many examples: www.michael-elliott.com

Here is a batch file function\snippet to get the idea of it:
Quote:runSQL
   set SQL_SCRIPT=%TMPDIR%\%SCRIPTNAME%.runSQL.sql
   echo %* > %SQL_SCRIPT%
   echo exit | %ORACLE_HOME%\bin\sqlplus -s %UN%/%PW% @%SQL_SCRIPT% >> %SLOG% 2>&1
   exit /b


Take Care,

Michael

J B Wood (Zumwalt)

11g is interesting, I had issues initially with the login after creating a database, but finally got past that point and can monitor the resources within their tools.
Been digging through there .Net class object code to see if I can find an easy way to get this thing wired up without writing a COM wrapper.
Thanks for the link to your site, I will take a look at it more tonight.