Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# replacement for VFP code
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01167122
Message ID:
01167199
Views:
17
>Hi,
>
>Below are the equivalent of VFP to C#. For a clearer idea on this, read Mastering C# Database Programming
>VFP C#
>
>This are use in conjunction to Datasets, dataadapter, Datatable etc....
>
>>--- ---
>Seek = FIND()-disadvantageous in record search,use STPROC/SQLSelect
>Append Blank = Rows.Add()
>Replace = UPDATE(DataTable)
>Delete = RemoveDataRow.Delete()
>
>BTW, its better to use Stored Procedures to Add, update and delete records than using a datasets in your app. Don't rely on datasets...a bad design of using datasets to a database application may lead to user frustration on the application and to the developer.
>
>

>
>Just because an app uses stored procedures [which it should] doesn't mean it shouldn't use datasets. Datasets are a great way to create disconnected views of data, for viewing result sets, reporting, etc. What's your specific reasoning here?
>
>Kevin

Hi Kevin,

Yes, its true that its useful in a database application for viewing results sets, reporting, etc. But just like what I'd said, "a bad design of using datasets...". A datasets is very useful when you presents records to users in a DataGridView provided that the records are filtered before calling the FILL() method, but if not then, your pulling all records to the client, even though its in disconnected manner, there will be a performance issue.

Let say you have a Transaction or Customers table with 1,000,000 records, are you going to present this to your users using datasets? For what? I have seen an application develop with Borland Delphi and it uses Datasets, and the way it uses datasets is very bad. The developer pulls the whole 480,000 records to the client machine.


Some developers might be creating datasets out of their database using the wizard and drop that datasets in a form, yes its very easy, its drag and drop operation but they might not notice the effect on the application.

There are pros and cons of using Datasets in an application...and depends what type of database application. And for my reasons are below..

Inserting, Update & Delete - I prefer adding, updating & deleting records using stored procedures without datasets because its more faster.


Performing Update operations - Datasets were designed for disconnected scenarios and it has disadvantages over executing SQL statements and stored procedures directly against a database.


Ok, to make it short, my main reason here is Application Performance.....
Jojo R. dela Cuesta, B.Sc.
eConsultant, Programmer
Dalplus Technologies
http://www.dalplus.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform