Thank you for raising these issues, tickets have been logged for the following:
1. Specifying the username and password in SQLCONNECT() causes the connection to fail
2. SQLEXEC() return value needs to be stored to a variable
3. VFP allows SQLDISCONNECT(0) to terminate all active connections, we do not currently support it.
Code:
pn=SQLCONNECT("dsn")
IF pn>0
m_ret = SQLEXEC(pn,"SELECT * from mytable","crsResult")
if m_ret > 0
SELECT crsResult
LIST
ELSE
MESSAGEBOX("ERROR ON SQL")
ENDIF
SQLDISCONNECT(pn)
ELSE
MESSAGEBOX("NO ODBC DATA")
ENDIF
Bookmarks