Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SQL Server without using *any* VFP table
Message
From
09/02/2005 10:28:11
 
 
To
09/02/2005 09:40:36
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00985130
Message ID:
00985173
Views:
29
Craig,

>You'll need to change your thinking about data. You never pull over the entire table. You work with sets of data. Think of it as always using a SQL SELECT with a WHERE clause. You'll need to have some type of query form where the user can enter their criteria and pull over only the records they need.

So, if I'm using SPT it's ok to select some chunk of data into a VFP cursor and use it bound to my controls?

Fernando

>There are two ways to access SQL Server, ODBC or ADO.
>
>ODBC is used for SQL Passthrough and Remote Views. Since you can't have any VFP tables, RVs are out. That leaves SPT or CursorAdapter. The CA will use either ODBC or ADO, depending on how you need to access the data.
>
>In either case, a cursor will be created by VFP. You use then bind that to UI controls, reports, etc.
>
>You'll need to change your thinking about data. You never pull over the entire table. You work with sets of data. Think of it as always using a SQL SELECT with a WHERE clause. You'll need to have some type of query form where the user can enter their criteria and pull over only the records they need.
>
>
>>Hi,
>>
>>This may sound somehow very naive, but it's a real problem I'm facing.
>>
>>I must develop an app using SQL Server as the backend, and can't use any VFP tables (.dbfs, .dbcs etc).
>>
>>The question is: what folks developing with VFP or even other tools (like VB) use to access SQL Server, retrive data, populate a combobox, a listbox, show data in a grid etc, for example?
>>
>>VFP works easily with that, because its controls can be bound to VFP tables and cursors. But how can I use those controls when data comes from SQL Server? Sometimes I may use cursors, but other times the source of data has thousands (or milions) of records and may not be appropriate to select them into a cursor and show in a control.
>>
>>So far I've being using SQL passthru for my apps when needed to access SQL Server, Oracle etc, but always brought selected data into VFP cursors and used them.
>>
>>My problem is that I don't know how to build such an application, and even know how to start! I have the "Client/Server Applications with Visual FoxPro and SQL Server" in my hands, but didn't find the answers to my questions. Of course it's my fault and I couldn't absorb correctly the information contained therein.
>>
>>So, what's the way to go? CursorAdapter, ADO, SQL passthru...? Them how?
>>
>>This type of application (SQL Server with no VFP tables) is seeming to be my future, as clients are asking me (forcing me...) more and more frequently to do so.
>>
>>Any comments about this subject will be highly appreciated.
>>
>>Thanks,
>>
>>Fernando
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform