I'm trying to establish connection to SQL 2000 database on a server on my LAN. I successfully created a connection using my ODBC data source. however, when i try to run SQL query using SQLExec, it fails.
Following is my code; can any one help me in this.
I'm trying to connect to ORDERS table of Northwind Database.
STORE SQLCONNECT('MRAD', 'sa') TO gnConnHandle
IF gnConnHandle < 0
= MESSAGEBOX('Cannot make connection', 16, 'SQL Connect Error')
ELSE
= MESSAGEBOX('Connection made', 48, 'SQL Connect Message')
SQLExec(gnConnHandle,'SELECT * FROM ORDERS','RESULT1')
SELECT RESULT1
BROW
ENDIF
TIA
Regards
Shaishav