Try this:
lcConnectionStr = "DRIVER={SQL Server};" +;
"SERVER=YourServerName;" +;
"DATABASE=NORTHWIND;" +;
"UID=sa;" +;
"PWD="
nSql = SQLSTRINGCONNECT(lcConnectionStr)
SQLEXEC(nSql, "sp_pkeys [order details]", "pkeys")
This calls the stored procedure sp_pkeys and returns primary key information for the table [order details] into a VFP cursos pkeys.
Daniel