Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxpro data to .Net
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Foxpro data to .Net
Miscellaneous
Thread ID:
01153891
Message ID:
01153891
Views:
51
Hi,

I have to convert a VFP(.prg) into a VB.Net program and I have some difficulty.

My biggest difficulty is because the foxpro program use cursor in his traitment and I don't know how to do the same thing in .Net. I know how to do simple select or update, but I don't know how to convert the cursor.

I'll show you the foxpro code :
LOCAL cEstimID, cBillLocat 
LOCAL ARRAY aInfo(1,1) 

  SELECT ai, estim_id, bill_locat, reviewerid, reviewerco FROM mittellog ; 
     WHERE !EMPTY(reviewerid) ; 
     AND   !EMPTY(reviewerco) ; 
     AND   estim_id NOT IN (SELECT estim_id FROM estimators) ; 
  INTO CURSOR curs_check 

  SELECT curs_check 
  SCAN 

     SELECT estim_id, bill_locat FROM reviewerids ; 
        WHERE reviewerid = curs_check.reviewerid ; 
        AND   reviewerco = curs_check.reviewerco ; 
     INTO ARRAY aInfo 

     IF _TALLY > 0 

        cEstimID   = aInfo(1,1) 
        cBillLocat = aInfo(1,2) 

        UPDATE mittellog SET estim_id = cEstimID, bill_locat = cBillLocat ; 
           WHERE ai = curs_check.ai 

     ENDIF 

     SELECT curs_check 

  ENDSCAN 
Anybody have some ideas, examples that can help me ?

Sorry if my english is not perfect
thx

--------------------------------------------------------------------------------------

Bonjour,

Je dois convertir un programme VFP(.prg) en un progamme VB.Net et j'ai quelques difficultés.

Ma plus grande difficulté viens du fait que foxpro utilise des curseurs dans son traitement et je n'arrive pas à faire l'équivalent en .Net. Je sais comment faire de simples select, update, mais pas le traitement avec les curseurs.

Je vous montre un exemple du code foxpro :
LOCAL cEstimID, cBillLocat 
LOCAL ARRAY aInfo(1,1) 

  SELECT ai, estim_id, bill_locat, reviewerid, reviewerco FROM mittellog ; 
     WHERE !EMPTY(reviewerid) ; 
     AND   !EMPTY(reviewerco) ; 
     AND   estim_id NOT IN (SELECT estim_id FROM estimators) ; 
  INTO CURSOR curs_check 

  SELECT curs_check 
  SCAN 

     SELECT estim_id, bill_locat FROM reviewerids ; 
        WHERE reviewerid = curs_check.reviewerid ; 
        AND   reviewerco = curs_check.reviewerco ; 
     INTO ARRAY aInfo 

     IF _TALLY > 0 

        cEstimID   = aInfo(1,1) 
        cBillLocat = aInfo(1,2) 

        UPDATE mittellog SET estim_id = cEstimID, bill_locat = cBillLocat ; 
           WHERE ai = curs_check.ai 

     ENDIF 

     SELECT curs_check 

  ENDSCAN
Quelqu'un aurait-il des idées, stratégies, exemples à me suggérer ?

Merci
Next
Reply
Map
View

Click here to load this message in the networking platform