I'm not sure I understand. Are you querying SQL Server or a VFP table? If SqlServer, can you post your code? This works for me:
CLOSE ALL
CLEAR ALL
RELEASE ALL
CLEAR
_sSqlConnStr = "DRIVER=SQL Server;SERVER=myDesktop;database=mysqlrms"
WAIT WINDOW "Connecting..." NOWAIT
lnHan = SQLSTRINGCONNECT(_sSqlConnStr)
WAIT CLEAR
? [Handle: ] +ALLTRIM(STR(lnHan))
IF lnHan > 0
lnokay=SQLSETPROP(lnHan,'Transactions',2)
lnokay=SQLEXEC(lnHan,"Select * from occ_main WHERE occup_id LIKE '1stH0001'",'sqlresult')
SELECT sqlresult
IF lnokay > 0
SELECT sqlresult
BROWSE
ENDIF
lnokay=SQLEXEC(lnHan,"Update occ_main SET name = 'My Name' WHERE occup_id LIKE '1STH0001'")
IF lnOkay <> 1
?[Errors: ]
? AERROR(errors)
ELSE
?[Update Ok.]
ENDIF
lnokay=SQLEXEC(lnHan,"Select * from occ_main WHERE occup_id LIKE '1stH0001'",'sqlresult')
IF lnokay > 0
SELECT sqlresult
BROWSE
ELSE
?[Unable to query occ_main again.]
ENDIF
IF SQLDISCONNECT(lnHan) = 1
? [Disconnected.]
ELSE
? [Error disconnecting.]
ENDIF
ELSE
? [ Unable to connect. ]
ENDIF
RETURN
>I am trying to setup an data source to get VFP data using a SQL-Server linked server.
>When I choose "Microsoft Visual Foxpro Driver" when creating the data source, I get:
>"You must first install the current veriosn of the Visual FoxPro ODBC Driver. Go to
http://msdn.microsoft.com/vfoxpro/downloads. Select product updates, then Visual FoxPro ODBC Driver. I downloaded it, installed it and when I try to choose the VFP driver, I get the same message. I've tried this on two computers. Any know the solution?
>TIA - Mark
.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"