Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
TableUpdate last parameter
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01564432
Message ID:
01564496
Vues:
39
This message has been marked as a message which has helped to the initial question of the thread.
this.mysqlexec("select * from dbo.ww_sales where CAST(sale_text as varchar(max)) like '%<guest_no>" + transform(m.pnDuplicate) + "</guest_no>%'", ;
      'ww_sales', program())
   this.make_view_updatable('ww_sales', 5)         && table buffering
   select ww_sales
   replace ALL sale_text with strtran(sale_text, "<guest_no>" + transform(m.pnDuplicate) + "</guest_no>", "<guest_no>" + transform(m.pnOriginal) + "</guest_no>",-1,-1,1)
   DIMENSION laCommitError[1]
   if not tableupdate(2, .t., 'ww_sales', laCommitError)
      llError = .t.
      = AERROR(laError)
      lcErrorMsg = m.lcErrorMsg + "Can not perform update of ww_sales" + CHR(13) + laError(1,2)

     oAppObj.write_log('Some rows in ww_sales table can not be committed: '+TRANSFORM(ALEN(laCommitError,1))+' rows.', 'E', PROGRAM())

     FOR EACH nRecord IN laCommitError
         GOTO nRecord

         * Mark bad record
     ENDFOR

   ENDIF
  
   use in select('ww_sales')
>>I test a few cases (MS SQL and MS Access)
>>
>>- changes are OK: the array is single cell with value -1
>>- changes not OK - row buffering: the array is single cell with value -1
>>- changes not OK - table buffering: the array is one dime, each cell - each bad record number
>>
>>
>Can you show your exact test statement?
>
>This is the code I have - see the commented stuff:
>
>
>this.mysqlexec("select * from dbo.ww_sales where CAST(sale_text as varchar(max)) like '%<guest_no>" + transform(m.pnDuplicate) + "</guest_no>%'", ;
>      'ww_sales', program())
>   this.make_view_updatable('ww_sales', 5)         && table buffering
>   select ww_sales
>   replace ALL sale_text with strtran(sale_text, "<guest_no>" + transform(m.pnDuplicate) + "</guest_no>", "<guest_no>" + transform(m.pnOriginal) + "</guest_no>",-1,-1,1)
>   DIMENSION laCommitError[1]
>   if not tableupdate(2, .t., 'ww_sales') && , laCommitError)
>      llError = .t.
>      = AERROR(laError)
>      lcErrorMsg = m.lcErrorMsg + "Can not perform update of ww_sales" + CHR(13) + laError(1,2)
>   ENDIF
>  
>*!*      IF TYPE('laCommitError[1]') <> 'L'
>*!*         
>*!*         llError = .t.
>*!*         oAppObj.write_log('Some rows in ww_sales table can not be committed: ' + TRANSFORM(laCommitError[1]), 'E', PROGRAM())
>*!*         IF laCommitError[1] = -1
>*!*           = AERROR(laError)
>*!*           lcErrorMsg = m.lcErrorMsg + "Can not perform update of ww_sales" + CHR(13) + laError(1,2)
>*!*         endif
>*!*      endif   
>   use in select('ww_sales')
>
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform