0

How to use Visual Foxpro ODBC drivers to connect to SAP B1 Hana? The good answer

Mar 22, 2017 at 01:34 PM

126

avatar image

Here is an example of code on how to connect from VFP to the SAP B1 HANA database :

vconnect = SQLSTRINGCONNECT("DRIVER={HDBODBC32};UID=YOURUSERNAME;PWD=YOURPASSWORD;SERVERNODE=SERVER_IP:30015;CS=YOURDATABASENAMEI")

m.sql = 'SELECT "CardCode" AS PNCFA,"AddID" AS PSIREN FROM OCRD'

lnRetVal = SQLExec(vconnect, m.sql,'zsap_ocrd')
If lnRetVal < 0
Aerror(arr)
Messagebox(arr[1,2])
Endif

SQLDisconnect(vconnect)

The only problem is that Foxpro will ask you to confirm the login to the Database.

I have not figured why yet.... do you have any idea ?

35o7i.png (21.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers

Skip to Content