Skip to content

Commit a7cc811

Browse files
authored
Merge pull request #23860 from YasmeenPM/master
HANA Client Tutorial Updates
2 parents 5ea3f46 + 394bf06 commit a7cc811

14 files changed

Lines changed: 48 additions & 17 deletions

File tree

tutorials/hana-clients-cf/hana-clients-cf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The command line interface (CLI) for Cloud Foundry is named `cf` while the CLI u
145145
pico server.js
146146
```
147147

148-
4. Add the code below to `server.js`. Be sure to update the `serverNode` value and user credentials if necessary.
148+
4. Add the code below to `server.js`. Be sure to update the `serverNode` value (SQL Endpoint from your instance) and user credentials if necessary.
149149

150150
```JavaScript
151151
var express = require('express');
64.2 KB
Loading

tutorials/hana-clients-choose-hana-instance/hana-clients-choose-hana-instance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Continue with this tutorial once you have created an SAP HANA Cloud trial or fre
103103

104104
![SAP HANA Cloud Trial instance](hana-cloud-instance.png)
105105

106-
106+
107107
1. Once the SAP HANA Cloud instance is created, take note of the SQL endpoint (host:port) needed to connect to the database. The endpoint can be obtained via the copy menu item. This will be needed in subsequent tutorials in the mission.
108108

109109
![SQL Endpoint](SQLEndpoint.png)
55 KB
Loading
155 KB
Loading
132 KB
Loading
61.9 KB
Loading

tutorials/hana-clients-hdbsql/hana-clients-hdbsql.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ Remembering and entering IP addresses, ports, user IDs and passwords can be diff
472472
hdbsql -U USER1UserKey -I hotel.sql -- batch file
473473
```
474474
475-
2. [Substitution variables](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/18ce51f468bc4cfe9112e6be79953e93.html) can used to pass parameters.
475+
2. [Substitution variables](https://help.sap.com/docs/SAP_HANA_CLIENT/f1b440ded6144a54ada97ff95dac7adf/18ce51f468bc4cfe9112e6be79953e93.html) can be used to pass parameters.
476476
477477
Create a file named `findCustomers.sql`.
478478
@@ -495,12 +495,14 @@ Remembering and entering IP addresses, ports, user IDs and passwords can be diff
495495
```Shell
496496
hdbsql -A -U USER1UserKey -V nameParam=J% -I findCustomers.sql
497497
```
498+
The -V option specifies a named variable that can be used within the SQL specified after the -I option.
498499
499500
![example of substitution parameters](subst.png)
500501
501502
It is also possible to define new variables and list the defined variables as shown below.
502503
503504
```SQL
505+
hdbsql -A -U USER1UserKey -V nameParam=J%
504506
\vd titleParam Mr
505507
\vl
506508
SELECT * FROM HOTELS.CUSTOMER WHERE TITLE = '&titleParam' AND FIRSTNAME LIKE '&nameParam'
668 Bytes
Loading

tutorials/hana-clients-jdbc/hana-clients-jdbc.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ primary_tag: software-product>sap-hana-cloud
2525
### Install a JDK
2626
Ensure that you have a Java Development Kit (JDK) installed and ensure that it is accessible from your path. Details on supported versions can be found at SAP Note [3165810 - SAP HANA Client Supported Platforms](https://launchpad.support.sap.com/#/notes/3165810).
2727

28-
An OpenJDK from SAP is available at [SapMachine](https://sap.github.io/SapMachine/#download).
28+
An OpenJDK from SAP is available at [SapMachine](https://sap.github.io/SapMachine/#download). If you don't already have a JDK installed, please install it from SapMachine.
2929

3030
To verify that the JDK is correctly set up, run the following:
3131

@@ -160,18 +160,24 @@ See [JDBC Command-Line Connection Options](https://help.sap.com/docs/SAP_HANA_CL
160160
161161
3. Compile the `.java` file into a `.class` file using the following command:
162162
163-
```Shell (Microsoft Windows)
163+
```Command Prompt (Microsoft Windows)
164164
javac -cp C:\SAP\hdbclient\ngdbc.jar;. JavaQuery.java
165165
```
166+
```Powershell (Microsoft Windows)
167+
javac -cp "C:\SAP\hdbclient\ngdbc.jar;." JavaQuery.java
168+
```
166169
167170
```Shell (Linux or Mac)
168171
javac -cp ~/sap/hdbclient/ngdbc.jar:. JavaQuery.java
169172
```
170173
171174
4. Run `JavaQuery.class` and indicate where the SAP HANA JDBC driver is located. Note that the host, port, UID and PWD will be retrieved from the `hdbuserstore`.
172175
173-
```Shell (Microsoft Windows)
176+
```Command Prompt (Microsoft Windows)
174177
java -classpath C:\SAP\hdbclient\ngdbc.jar;. JavaQuery
178+
```
179+
```Powershell (Microsoft Windows)
180+
java -classpath "C:\SAP\hdbclient\ngdbc.jar;." JavaQuery
175181
```
176182
177183
```Shell (Linux or Mac)

0 commit comments

Comments
 (0)