Hi Mike,
Looks like in the first example the line that starts with 'csql = ' is incomplete or incorrect. It references alias 'a' w/o defining it.
>Hi,
>
>I'm having a problem when querying one of my tables(DBF) using SQL PassThrough. The two sets of commands are shown below.
>
>
>nHandle = Sqlconnect("bbfsdsn")
>csql = [Select a.* from Accounting!datacenter] + Alltrim(Str(thisform.dcno))
>nResult = Sqlexec(nHandle, cSQL, 'cur_result')
>Select cur_result
>Browse
>
>
>nHandle = Sqlconnect("bbfsdsn")
>csql = [Select a.* from Accounting!datacenter a where dcno = ] + Alltrim(Str(thisform.dcno))
>nResult = Sqlexec(nHandle, cSQL, 'cur_result')
>Select cur_result
>Browse
>
>The first set of commands works fine. The second one does not query the table with the parameter I specified. I can't tell the difference between the two. The field dcno in the second command has a data type Integer(4). Any Help will be appreciated
>
>Thanks in advance...
--sb--