Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with sqlexec
Message
 
To
14/11/1997 16:29:55
Anderson Girardi
Athenas Automação de Escritório
Porto Alegre, Brazil
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00060362
Message ID:
00060365
Views:
26
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform