Tuesday, October 24, 2017

Mimicking numeric TextBox of Visual Foxpro in WFP


Because Visual FoxPro is a RAD tools it's very easy to format a numeric on a TextBox  or even on a prompt screen as shown below, on a prompt screen it will only take a single line of code using PICT clause and on VFP Form using TextBox a simple Format and InputMask is all needed.

I'm trying to mimic the VFP numeric formatting on a TextBox using WFP, I achieved it (almost) It's a lot of work and the code is massive. try searching "WPF TextBox numeric formatting" over the internet to know what I'm talking about 😄




On the other hand in Visual Studio using WFP it's needs a massive line of codes to achieve this simple task, if any one has made a simple solution that can achieved the one shown in the video link below, hats off to you and I'm all ears to hear about it.



Wednesday, October 11, 2017

LINQ using two tables on Managed Dbf


A demonstration of querying two Managed Dbf tables using LINQ to find all sales record of a particular customer and display it's Sales Invoice No. and  Amount.




Managed Dbf can do it in the good old fashion but effective way, an xBase style of gathering information without using a querying language.





Managed Dbf Methods and Properties are almost identical to Visual FoxPro Commands.


Thursday, October 5, 2017

LINQ saved my day!


LINQ saved my day by writing my own OLEDB and OBDC driver for Managed Dbf, I'm in the process of learning, researching and studying how to build my own OLEDB like VFPOLEDB to support querying language until I read  Why LINQ beats SQL .

Now, I don't have to go through the lengthy process of creating my own Data Provider or to load any OBDC Driver or using any ADO/NET data connector for Managed Dbf  just to have a querying language to gather information, LINQ now can be use to query data in Managed Dbf  but it's still in early stage. I Quoted from LINQPad creator "LINQ is in most cases a significantly more productive querying language than SQL."

I wanted Managed Dbf to be free of any third party library or driver with only minimum set of .Net Assemblies, by using LINQ which is a major part .NET Framework since .NET 3.5 uses an SQL-like syntax to make a query expressions.

Managed Dbf using LINQ in action  :











XBase / Clipper / Visual FoxPro Equivalent Commands  :