28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

14 Using Database Client Interfaces<br />

<strong>SAP</strong> <strong>HANA</strong> provides client interfaces for connecting applications so they can retrieve and update data.<br />

<strong>SAP</strong> <strong>HANA</strong> provides many methods for applications to access its data. For example, a spreadsheet application<br />

could use ODBO to consume analytic views and enable users to create pivot tables, or a Web application could use<br />

OData interfaces to access the data and display it.<br />

<strong>SAP</strong> <strong>HANA</strong> can expose data with the following interfaces:<br />

● Client interfaces, which are available as long as the <strong>SAP</strong> <strong>HANA</strong> clients are installed:<br />

○ ODBC<br />

○ ODBO<br />

○ JDBC<br />

● Web-based interfaces, which must be defined by the application developer, who determines what data to<br />

expose and to whom:<br />

○ OData<br />

○ XMLA<br />

○ Server-Side JavaScript<br />

Related Links<br />

<strong>SAP</strong> <strong>HANA</strong> Database - Client Installation <strong>Guide</strong><br />

Defining Web-based Data Access [page 164]<br />

<strong>SAP</strong> <strong>HANA</strong> extended application services (<strong>SAP</strong> <strong>HANA</strong> XS) provide applications and application developers<br />

with access to the <strong>SAP</strong> <strong>HANA</strong> database using a consumption model that is exposed via HTTP.<br />

14.1 Connecting via ODBC<br />

<strong>SAP</strong> <strong>HANA</strong> provides an ODBC driver for connecting applications to the database.<br />

Note: Make sure to use the 32-bit ODBC driver for 32-bit applications, and the 64-bit driver for 64-bit<br />

applications.<br />

1. Install the ODBC driver. The driver is installed as part of the <strong>SAP</strong> <strong>HANA</strong> client installation.<br />

2. Write code to create a connection to the database. You can use one of the following methods:<br />

○ Connection String (SQLDriverConnect): Use a connection string in the form:<br />

DRIVER={};UID=;PWD=;<br />

SERVERNODE=:;<br />

should be one of the following:<br />

○ HDBODBC: For 64-bit applications<br />

○ HDBODBC32: For 32-bit applications<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Using Database Client Interfaces<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved. 355

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!