Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That's funny, I've <a href="http://synopse.info/fossil/info/d62eb166b7" rel="nofollow">just finished</a> (some minutes ago) the port of my Open Source native Oracle access to Delphi 5.</p> <p>Here are the main features of this unit:</p> <ul> <li>Direct access to the Oracle Call Interface (OCI) client, with no BDE, Midas, DBExpress, nor OleDB or ODBC provider necessary;</li> <li>Dedicated to work with any version of the Oracle OCI interface, starting from revision 8;</li> <li>Optimized for the latest features of Oracle 11g (e.g. using native Int64 for retrieving NUMBER fields with no decimal);</li> <li>Able to work with the Oracle Instant Client for No Setup applications;</li> <li>Natively Unicode (uses internal UTF-8 encoding), for all version of Delphi, with special handling of each database char-set;</li> <li>Tried to achieve best performance available from every version of the Oracle client;</li> <li>Designed to work under any version of Windows, either in 32 or 64 bit architecture;</li> <li>Late-binding access to column names, using a new dedicated Variant type (similar to Ole Automation runtime properties);</li> <li>Connections are multi-thread ready with low memory and CPU resource overhead;</li> <li>Can use connection strings like '//host[:port]/[service_name]', avoiding use of the TNSNAME.ORA file;</li> <li>Use Rows Array and BLOB fetching, for best performance (ZEOS/ZDBC did not handle this, for instance);</li> <li>TQuery emulation class, for direct re-use with existing code, in replacement to the BDE;</li> <li>Handle Prepared Statements - but by default, we rely on OCI-side statement cache, if available;</li> <li>Native export to JSON methods, which will be the main entry point for our mORMot framework;</li> <li>Compatible with Delphi 5 up to XE;</li> <li>Since it doesn't use the DB unit, nor DBExpress or such other technologies, works with any edition of Delphi (even Delphi XE Stater or Delphi 7 Personal);</li> <li>Open Source, released under a MPL/GPL/LGPL license.</li> </ul> <p>See <a href="http://blog.synopse.info/post/2011/07/09/SynDBOracle%3a-Open-Source-native-Oracle-access" rel="nofollow">this web site for more details and feedback</a>.</p> <p>You have a <code>TQuery</code> like wrapper, to write code just like with the BDE.</p> <p>Or you can write code as such:</p> <pre><code>procedure Test(Props: TOleDBConnectionProperties; const aName: RawUTF8); var I: ISQLDBRows; begin I := Props.Execute('select * from Domain.Customers where Name=?',[aName]); while I.Step do writeln(I['Name'],' ',I.['FirstName'],' ',I['Address']); end; var Props: TOleDBConnectionProperties; begin Props := TSQLDBOracleConnectionProperties.Create( 'TnsName','UserName','Password',CODEPAGE_US); try Test(Props,'Smith'); finally Props.Free; end; end; </code></pre> <p>Unfortunately, Delphi 5 do not allow late-binding via a variant, which is allowed with Delphi 6 and up:</p> <pre><code>procedure Test(Props: TOleDBConnectionProperties; const aName: RawUTF8); var I: ISQLDBRows; Customer: Variant; begin I := Props.Execute('select * from Domain.Customers where Name=?',[aName],@Customer); while I.Step do writeln(Customer.Name,' ',Customer.FirstName,' ',Customer.Address); end; </code></pre> <p>If you really want to use the DB components in a RAD approach, take a look at <a href="http://www.torry.net/pages.php?id=549" rel="nofollow">the corresponding page in Torry's page</a>:</p> <ul> <li>ATOM Access To Oracle Magic;</li> <li>DOCI Components for Direct Oracle Access;</li> <li>NC OCI8;</li> <li>Orange Component Set;</li> <li>Vlad Karpov Native Link to Oracle.</li> </ul> <p>You'll find there some old free components, mostly created at Oracle 8 time (SynDBOracle is optimized for Oracle 11g but will work with earlier versions of Oracle), but which may better suit your need for Oracle connection without the BDE.</p> <p>Of course, there are also some very good commercial components around, still working with Delphi 5. But you'll have to pay the high price... and should better upgrade to a newer Delphi version, by the way. ;)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload