>lnConnHandle=SQLSTRINGCONNECT("DRIVER=SQL Server;SERVER=STRDBF02;APP=Microsoft Visual FoxPro;DATABASE=ADEPT5_GLSS;UID=reports;Password=reports")
>
>This my connection, It says I am connected but my query won't run. When I log in as a trusted connection it works fine. What am i missing.
>
>Thanks
You missing the check WHY it not runs:
lnConnHandle=SQLSTRINGCONNECT("DRIVER=SQL Server;SERVER=STRDBF02;APP=Microsoft Visual FoxPro;DATABASE=ADEPT5_GLSS;UID=reports;Password=reports")
IF lnConnHandle < 0
AERROR(laError)
MessageBox(laError[1,2])
RETURN
ENDIF
IF SQLEXEC(lnConnHandle, query here, [CursorHere]) < 0
AERROR(laError)
MessageBox(laError[1,2])
RETURN
ENDIF
...
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.