1. First create ODBC DSN.
2. Start visual foxpro establish connection
*To establish connection with DSN name LearnDB
ConStat = SQLSTRINGCONNECT('dsn=LearnDB',.T.)
*To Check the connection.
?ConStat
*To check ConStat value
* if value > 0 it means connection established.
DISPLAY MEMORY
**To view the list of tblCities
GetCities = SQLEXEC(1,'Select * from tblCities',"Cities")
No comments:
Post a Comment