Cursoradapter eases the transition from DBC to SQL: you can tailor the SQL command according to the backend, recycle your code, test against either backend seamlessly.
Thierry Nivelet http://foxincloud.com/ Give your VFP app a second life in your cloud
Le 20 août 2019 à 16:11, Paul H. Tarver paul@tpcqpc.com a écrit :
Peter,
Personally, I like SPT because I can build valid and safe pass-through commands in my code based on user selections, generate the string, hand it off to the server with an ASYNCH connection and easily provide users with progress feedback while data is returned.
For some reason, I've never been able to wrap my head around cursor adapters completely. Maybe it’s a control issue! :) I think SPT just made more sense to me upfront. Thankfully, Foxpro gives you plenty of different ways to accomplish the same things and you can pick the one that works the way you do! I use it to query data for reporting purposes and it gives me a lot of control over how I construct the query string since I can use all of the string functions within Foxpro to build exactly the query I want based upon users' selections.
Another advantage is I able to dump the query string to my audit files just before the SQLEXEC() command fires, so if something goes wrong, I can just copy the query to my SQL management tool and see if I can manually figure out what is going on.
So far, I've used SPT successfully to backend Foxpro with SQL, MySQL, Oracle, Access, PostgreSQL, SQLite, etc. I just tweak queries to customize for the database and the rest of my code remains the same.
It works for me, but I'm sure, someone else here will provide you with the benefits of cursor adapters.
Paul H. Tarver
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Peter Cushing Sent: Tuesday, August 20, 2019 4:40 AM To: profoxtech@leafe.com Subject: SQL server connection
Hi,
After running my app (VFP 9) on our local network (with a DBC) for many years, we are upgrading it (in stages) to a visual studio app with SQL server back end. I have read many people here talking about using SQL as a back end. At the beginning I will just be accessing the SQL data for reporting purposes but may need to write to it at some point. Looking through the archives some people mentioned SPT and others cursor adapters. Just wondering what people recommend to connect, so I can avoid the usual gotchas.
Thanks,
Peter Cushing IT Department WHISPERING SMITH
This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.
www.whisperingsmith.com
Whispering Smith Ltd Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 3700 Fax:0161 831 3715
London Office: 101 St. Martin's Lane,London, WC2N 4AZ Tel:0207 299 7960
[excessive quoting removed by server]