>Hello All!!!!
>
>I finaly get to stablisher a conncetion with Data Source, but i didn't get do a correct select sql select, i'm using the follow sintax
>
>STORE SQLSTRINGCONNECT() TO nCONECTAR
>=SQLEXEC(nCONECTAR,'SELECT Video.codtitu, Video.tit_port;
> FROM user.video Video;
> WHERE Video.tit_port = 'rico total';
> ORDER BY Video.tit_port', 'MyCursor')
>
>but the VFP shows me a message speaking "FUNCTION NAME IS MISSING).
>
>Anyone have any idea?
>
>Thanks
>
>
>Anderson Reis Girardi
Anderson,
You need to keep in mind that the entire SQL statement is one string. When you put the single quotes around rico total, the first quote closes the string. Try This:
=SQLEXEC(nCONECTAR,[SELECT Video.codtitu, Video.tit_port;
FROM user.video Video;
WHERE Video.tit_port = 'rico total';
ORDER BY Video.tit_port], 'MyCursor')
If you're using SQL Server, make sure you use single quotes around any value inside the string, as shown above.
Josh