Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP to C# re-write
Message
De
12/02/2013 16:24:05
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01565784
Message ID:
01565824
Vues:
74
This message has been marked as a message which has helped to the initial question of the thread.
>Hi everybody,
>
>I am wondering what is the best way of re-writing the following logic in VFP into C#:
>
>
>select 0
>      create cursor csrMatch (pass_no B(0), invoice_no B(0), date_time T, inv_bal Y, availbonus Y, cashoutbal Y)
>
>
>After that cursor is created, I get 10 rows from the SQL server. Then for each of these 10 rows the stored procedure is run and if one of the returned column is not 0 (the result of the procedure is a single row), the row is inserted into this cursor (row based on the first and second cursors).
>
>And finally we format that csrMatch into XML string and return back.
>
>So, my first question is how to simulate creating a cursor and inserting rows into it in C# and my second question (assuming I need to use datatable for the first) is how to convert datatable into SqlReader (if one can be converted into another) as I have methods what produce XML based on passed SqlReader.
>
>Thanks in advance.

Why not get all the data prepped on the backend before you even hit C#?


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform