on 03-22-2017 1:34 PM
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 ?
User | Count |
---|---|
88 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.