Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I know that we have to move to C# from VFP, but..
Message
De
13/10/2010 04:32:15
 
 
À
12/10/2010 18:48:36
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01485104
Message ID:
01485205
Vues:
98
>My personal preference would be to continue to use VFP to parse the flat files from the state into dbfs and then push the data to sqlserver.
>
>:o)
>
>Once the data is in the backend, use any/all of Craig's suggestions from that point on. there are plenty of front end ui options, architecture and pattern options, report writer options, etc.
>
>However, there are options for parsing flat files using C#.
>
>One option is to use xml templates to do it:
>http://articles.techrepublic.com.com/5100-10878_11-6156780.html

After a quick look at the other options I like this best. All of the others imply having to hardcode some knowledge of the text file format. With this you could at least build up a library of XML files for re-use if the same data comes along again. You could also extend the XML to define a SQL table format then create the table and import directly into it.....

>Another generic parser option:
>http://www.codeproject.com/KB/database/GenericParser.aspx
>
>Parsing a flat file into xml (from there you can go into sqlserver or other options) using C#:
>http://www.c-sharpcorner.com/UploadFile/rmcochran/FlatFileToXmlDocument06302007111353AM/FlatFileToXmlDocument.aspx
>
>Or linq to text files:
>http://blogs.msdn.com/b/ericwhite/archive/2006/08/31/734383.aspx

There's a refined version of this approach here :
http://blogs.msdn.com/b/ericwhite/archive/2008/09/30/linq-to-text-and-linq-to-csv.aspx
but, in the end, it's a fairly trivial use of linq....

>Or using regular expressions:
>http://visualstudiomagazine.com/articles/2004/11/01/parse-text-files-with-regular-expressions.aspx
>
>Using textreader and textwriter:
>http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=132
>
>CSV Parser:
>http://www.heikniemi.net/hardcoded/2004/10/csv-parser-for-c/
>
>More options here:
>http://stackoverflow.com/questions/300671/how-do-i-parse-a-text-file-in-c
>
>Just do some research and some tests... (I don't think you will find anything as robust as VFP for massaging data though - regardless of what you will see the .net preachers posting - although you may find an option that will meet your requirements and also provide a rich UI experience and easy reporting and a future :o)
>
>
>
>>I was having a discussion with our CIO who doesn't know anything about Visual FoxPro (9) and has only experience with Classic ASP and VB and he thinks they were great.
>>
>>He also said that once we get a better programming language (C#) that because it is more efficient all our problems (being behind schedule, etc.) will go away. He also speculated that there were some great 3rd party tools that would make the data access better in C#. Of course, my experience with C# is a couple of web apps that I wrote, using MereMortals .NET and watching videos on LearnDevNow.
>>
>>I just do not believe that our problems are because of FoxPro.
>>
>>Most of the coding we do is grab data from flat files provided by the State and push the data into FoxPro tables or SQL Server tables and beat the data up and create PDF reports and spreadsheets. So, we really need and use commands like APPEND FROM SDF or Delim, SCAN FOR, Update, Insert, Replace data in current row, SQL Select etc.
>>
>>Does anyone know of some magical C# tools that will take the place of those useful FoxPro one-line commands? And I'm not talking about BOs here. No, I doubt it. I think for APPEND FROM (with a FOR) SDF that you would have to write a custom parser for each input in .NET.
>>
>>Bottom line is that I believe that our efficiency and productivity will go down and we will need more programmers not less.
>>
>>Yes, I know FoxPro is dead and I'm dying to program in C# only, but what is the truth?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform