Mike,
Do you have a typo, or are you looking for a field named ".T." ???
Looks like your cSQL evaluates to
Select * from DatabaseName!TableName WHERE fieldname = .T.
>Hi!
>
>Im Querying a table using sqlconnect and sqlexec commands. Im trying to query a table with a parameter .T. The code is illustrated below. Please check if there is an error on my syntax
>
>nHandle = Sqlconnect("DNSname")
>cSQL = [ Select * from DatabaseName!TableName WHERE fieldname = ] + [.T.]
>nResult = Sqlexec(nHandle, cSQL, "cur_tablename")
>
>with this code, nResult returns a negative value and does not produce the cursor I wanted to create base from the query.
>
>
>Any Help will be greatly appreciated
>
>thanks in advance...