Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Good ADO book for VFP 9
Message
From
29/06/2006 08:21:36
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
29/06/2006 02:17:18
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01132448
Message ID:
01132673
Views:
16
>Hi Cetin,
>
>>[..]I don't agree ODBC is slower but I respect your decision.
>>I don't have a single suggestion for data access. On my own I use SPT,ADO >as I see fit.
>
>We have an application that relies nearly exclusively on cursoradapters. The current version works exclusively through ODBC (three back-ends, SQL server and Sybase Anywhere and open source firebird).
>
>What would be the benefit, if any, of changing the "data source" from ODBC to ADO? I cannot see any at the moment!
>
>Another issue is "Is there a trick for SQLEXEC a command from VFP via ADO". The software relies on cursoradapters but a few SQLEXEC statements are run from time to time. What is the recommended solution to run them?
>
>François

Hi François,
I don't see a benefit 'worth' the change if it's already working with ODBC. One benefit might be BatchUpdate but you can do that with ODBC too anyway:) Another benefit is disconnecting and using less server resources - yet again something you could do with ODBC as well. Another benefit might be connecting to an XML (including RS saved schema which XMLToCursor-XML source etc fail to open) and converting or using it as a cursor. There are other places where ADO is the only ticket but rare and such result cursors are not manageable as cursors. Unless you need it you don't even notice they exist:)

"Is there a trick for SQLEXEC a command from VFP via ADO".
Not sure about the question. You can execute any command via ADO that you could do from an SQLExec. If that's it there are several ways. Here are some (symbolic cn,rs,cmd for ADODB connection,recordset,command objects):

* execute via connection object-returns recordset
rs = cn.Execute(lcSQLCommand)


* execute via command object-returns recordset
cmd.CommandType = 4 && stored proc
cmd.CommandText = "spName"
*... parameters
rs = cmd.Execute

* execute via command object-returns recordset
cmd.CommandText = m.lcSQL
cmd.Execute

* use recordset object itself
rs.Open(m.lcSQL,cn)

Also there are other objects like stream which could be used as well.

PS: Python is cool:)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform