1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| vfpcon="DRIVER={Oracle dans OraDb11g_home1};UID=userid;PWD=password;PROTOCOL = TCP;Server=x.x.x.x; SID=ORCL; DATABASE=ORCL ;DRIVER ={Oracle dans OraDb11g_home1};PORT=1158;"
gnConnHandle= SQLSTRINGCONNECT(vfpcon)
IF gnConnHandle < 0
MESSAGEBOX("Cannot make connection", 16, "SQL Connect Error")
ELSE
MESSAGEBOX("Connected to oracle")
cSQLCommand = "SELECT * FROM article"
nRet = SQLEXEC(gnConnHandle ,cSQLCommand,'Result')
IF nRet >0
SELECT Result
BROWSE
ELSE
AERROR(laError)
? laError[1,1],laError[1,2], laError[1,3],laError[1,4], laError[1,5], laError[1,6]
MESSAGEBOX("NOT Successful Execution! ")
ENDIF
ENDIF |
Partager