Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Don'ts
Message
From
23/05/2001 02:04:19
 
 
To
22/05/2001 22:03:45
General information
Forum:
Visual FoxPro
Category:
Visual ProMatrix
Title:
Miscellaneous
Thread ID:
00509784
Message ID:
00510207
Views:
28
Hi Alex

Thanks for your input. May I know under what situation should I use SQL passthru versus VFP remote view. I believe SQL passthru is more data specific but faster. I'm attemting to migrate my current VFP application (in VPM) to client server but would be grateful if u could advise me before I take the plunge. I'm currently using Foxfire and would u be able to recommend report writer that would work well in client server environment.

Best Regards
>Farouk,
>
>VFP functions are different from the ones in T-SQL (the language in SQL Server). So you cannot run a query using SQLEXEC() like the one you posted, because T-SQL does not have a DTOS() function. You would have to change it to using DatePart(). The point of SQL Pass-Through is that you pass queries or commands to the back-end database without being processed by VFP. Therefore you have to pass commands or queries that are valid in the language of the back-end.
>
>>>>>>>>>>>>>>>>>>
>>Eg. I have a table XYZ with primary key Period and another table ABC with primary key , patient_id and a non key field called visit date. ABC is related through cperiod. My SQL statement goes like this :
>>
SELECT * FROM XYZ,ABC WHERE LEFT(DTOS(visit_date),6)=cperiod
>>Would the above statement works when I upsize to SQL SErver? Else should I create another field cperiod into ABC but then cperiod is fully derivable from visit date and that we're suppose not to have calculated fields in our table.
>>>>>>>>>>>>>>>>>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform