I am new to programming FoxPro with SQL. I need to do a simple task. I need to read a record from the calendar table in our payroll SQL Server DB. I have coded the following. The sqlconnect and the sqlexec(select . . .) are done only once. The sqlexec retrieves only one record and creates a cursor named sqlresult. How do I access the fields from this record in the cursor?

gnConnect = SQLCONNECT("payroll", "sqluser", "seagate")
IF gnConnect <= 0
=MESSAGEBOX("Could not establish a database connection.", ;
0, "Connection Error")
RETURN
ENDIF

================================================== ========

gnLogin = SQLEXEC(gnConnect, 'select * from payroll.dbo.calendar where cur_year = m->lyear and cur_week = lweek')
IF gnLogin > 0
ELSE
WAIT WINDOW "Error on select"
ENDIF

================================================== ========