I'm starting to use C# a fair bit now in Dot net, and am wondering if
there is any resource out there which has a 'Replacement' table for VFP v's C# commands, particualarly data commands
(I've got Dot Net for VFP Developers book and also had a look at the VFP toolkit for dot net. These do a good job but dont concentrate on Data type commands.
If theere was something like the following:
VFP C#
--- ---
Seek = ???
Append Blank = ???
Replace = ???
Delete = ???
Hi, Gerard,
First, are you referring to data in your back-end database, or data that you've brought down from your back-end database into a dataset?
If you're referring to these operations on your back-end database, you'd use your standard SELECT/UPDATE/INSERT/DELETE commands, either in a stored procedure or in a SQL command object as part of your .NET data access component.
If you're referring to data that you've retrieved into a dataset, there are many commands in ADO.NET that are functional equivalents. For instance, if you have a datatable with a column called MyPrimaryKey, you can create a primary key on the column, and do a FIND, which is the equivalent of a SEEK. A FIND will return a row object for the datarow corresponding to the key you did the search on, like follows...
MyDataTable.PrimaryKey = new DataColumn[] {MyDataTable.Columns["MyPrimaryKey"]};
DataRow dr = MyDataTable.Find(111);
You may want to check out Message #
1142200. Someone asked some questions on ADO.NET.
If you can give some specifics on where you want to perform these operations, I might be able to give some specific follow-up answers.
Kevin