Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 71d40963b505df4524269198e237b3e3 > files > 775

virtuoso-opensource-doc-6.1.4-2.fc14.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
 <head profile="http://internetalchemy.org/2003/02/profile">
  <link rel="foaf" type="application/rdf+xml" title="FOAF" href="http://www.openlinksw.com/dataspace/uda/about.rdf" />
  <link rel="schema.dc" href="http://purl.org/dc/elements/1.1/" />
  <meta name="dc.title" content="7. Data Access Interfaces" />
  <meta name="dc.subject" content="7. Data Access Interfaces" />
  <meta name="dc.creator" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="dc.copyright" content="OpenLink Software, 1999 - 2009" />
  <link rel="top" href="index.html" title="OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="search" href="/doc/adv_search.vspx" title="Search OpenLink Virtuoso Universal Server: Documentation" />
  <link rel="parent" href="accessinterfaces.html" title="Chapter Contents" />
  <link rel="prev" href="virtoledb.html" title="OLE DB Provider for Virtuoso" />
  <link rel="next" href="accintudsockets.html" title="Unix Domain Socket Connections" />
  <link rel="shortcut icon" href="../images/misc/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" type="text/css" href="doc.css" />
  <link rel="stylesheet" type="text/css" href="/doc/translation.css" />
  <title>7. Data Access Interfaces</title>
  <meta http-equiv="Content-Type" content="text/xhtml; charset=UTF-8" />
  <meta name="author" content="OpenLink Software Documentation Team ;&#10;" />
  <meta name="copyright" content="OpenLink Software, 1999 - 2009" />
  <meta name="keywords" content="" />
  <meta name="GENERATOR" content="OpenLink XSLT Team" />
 </head>
 <body>
  <div id="header">
    <a name="inprocess" />
    <img src="../images/misc/logo.jpg" alt="" />
    <h1>7. Data Access Interfaces</h1>
  </div>
  <div id="navbartop">
   <div>
      <a class="link" href="accessinterfaces.html">Chapter Contents</a> | <a class="link" href="virtoledb.html" title="OLE DB Provider for Virtuoso">Prev</a> | <a class="link" href="accintudsockets.html" title="Unix Domain Socket Connections">Next</a>
   </div>
  </div>
  <div id="currenttoc">
   <form method="post" action="/doc/adv_search.vspx">
    <div class="search">Keyword Search: <br />
        <input type="text" name="q" /> <input type="submit" name="go" value="Go" />
    </div>
   </form>
   <div>
      <a href="http://www.openlinksw.com/">www.openlinksw.com</a>
   </div>
   <div>
      <a href="http://docs.openlinksw.com/">docs.openlinksw.com</a>
   </div>
    <br />
   <div>
      <a href="index.html">Book Home</a>
   </div>
    <br />
   <div>
      <a href="contents.html">Contents</a>
   </div>
   <div>
      <a href="preface.html">Preface</a>
   </div>
    <br />
   <div class="selected">
      <a href="accessinterfaces.html">Data Access Interfaces</a>
   </div>
    <br />
   <div>
      <a href="virtclientref.html">ADO.Net Data Provider</a>
   </div>
   <div>
      <a href="isql.html">Interactive SQL Utility</a>
   </div>
   <div>
      <a href="odbcimplementation.html">Virtuoso Driver for ODBC</a>
   </div>
   <div>
      <a href="VirtuosoDriverJDBC.html">Virtuoso Driver for JDBC</a>
   </div>
   <div>
      <a href="virtoledb.html">OLE DB Provider for Virtuoso</a>
   </div>
   <div class="selected">
      <a href="inprocess.html">Virtuoso In-Process Client</a>
   </div>
   <div>
      <a href="accintudsockets.html">Unix Domain Socket Connections</a>
   </div>
   <div>
      <a href="dataccessclientsconfailandbalance.html">Virtuoso Data Access Clients Connection Fail over and Load Balancing Support</a>
   </div>
    <br />
  </div>
  <div id="text">
    <a name="inprocess" />
    <h2>7.6. Virtuoso In-Process Client</h2>

<p>The in-process client is an efficient mechanism used by hosted applications
to access the database functionality of the hosting Virtuoso server.</p>

<p>Normally applications access Virtuoso using the remote procedure call mechanism
hidden behind some sort of higher-level API such as ADO.NET, ODBC, and so on.
The RPC based mechanism is the only available interface for non-hosted applications.
For hosted applications, when the application and the DBMS server reside in the same
OS process, Virtuoso provides a mechanism based on direct in-process procedure
calls.</p>

<p>The in-process call mechanism by itself is not exposed to the applications. 
It is hidden behind the same APIs as the RPC one: ODBC, JDBC, ADO.NET. So in both
cases applications deal with the same APIs and the application logic does not
change. The application chooses which mechanism to use when it opens a
database connection.</p>

<p>To make an in-process connection to a Virtuoso server from within an
application hosted by the same server it is necessary to use a special inprocess address 
syntax distinguishing it from the regular network &quot;HOST:PORT&quot; address syntax.  
The In-process address has the following form:</p>

  <div>
      <pre class="programlisting">:in-process:PORT</pre>
    </div>

<p>Note that it begins with a colon, then specifies the 
&quot;<span class="computeroutput">in-process</span>&quot; keyword, followed by another 
colon, and finally the port number on which the server listens for TCP connections.</p>

<p>This port is only used for establishing the in-process connection, after which 
the connection proceeds exclusively through the in-process procedure call mechanism.</p>

<p>The in-process connections are presently only supported by the Virtuoso 
ODBC driver and the ODBC-based .NET Data Provider (OpenLink.Data.VirtuosoClient).
The managed .NET Data Provider (OpenLink.Data.Virtuoso) does not yet support
in-process connections.</p>

<p>In-process ODBC connection are defined in either a DSN or a connect string 
directly.  This is an example section of the odbc.ini file for unix/linux:</p>

<div>
      <pre class="programlisting">
[InProcess]
Driver	= /opt/virtuoso/lib/virtodbc32_r.so
Address	= :in-process:1111
</pre>
    </div>

<p>To open an ADO.NET connection the in-process address should be specified
in the connection string.</p>

<p>Here is an example of using the OpenLink.Data.VirtuosoClient adapter 
specifying the details on the connect string:</p>

<div>
      <pre class="programlisting">
VirtuosoConnection = new VirtuosoConnection (&quot;HOST=:in-process:1111&quot;);
</pre>
    </div>

<p>Every in-process connection originates from the existing connection.
For instance, it might be initiated by a stored procedure called from an
ISQL connection, or it can be called from an ASPX session.</p>

<p>In-process connections always inherit the user ID from its parent connection.
There is no way to set or change the connecting user ID.  Therefore the user ID 
and password are not specified when the in-process connection is opened.</p>

<p>In-process connections also limit database transactions. The autocommit mode
is never in effect for in-process connections. The setting of autocommit
mode is silently ignored without reporting any errors.</p>

<table border="0" width="90%" id="navbarbottom">
    <tr>
        <td align="left" width="33%">
          <a href="virtoledb.html" title="OLE DB Provider for Virtuoso">Previous</a>
          <br />OLE DB Provider for Virtuoso</td>
     <td align="center" width="34%">
          <a href="accessinterfaces.html">Chapter Contents</a>
     </td>
        <td align="right" width="33%">
          <a href="accintudsockets.html" title="Unix Domain Socket Connections">Next</a>
          <br />Unix Domain Socket Connections</td>
    </tr>
    </table>
  </div>
  <div id="footer">
    <div>Copyright© 1999 - 2009 OpenLink Software All rights reserved.</div>
   <div id="validation">
    <a href="http://validator.w3.org/check/referer">
        <img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>
    <a href="http://jigsaw.w3.org/css-validator/">
        <img src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88" />
    </a>
   </div>
  </div>
 </body>
</html>