Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem adding records to some tables
Message
De
19/07/2002 15:29:10
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Problem adding records to some tables
Divers
Thread ID:
00680599
Message ID:
00680599
Vues:
52
Hello, i'm tryign to add some records in two tables and effectively it does, but when you close the foxpro session it erase the records added.

This is my code:
WITH THISFORM
   *SE EMPIEZA CON EL PROCESO DE ASIGNACIÓN DEL SOFTWARE
   dimension arreglo(.list1.listcount)
   i=1
   select licencias
   for i=1 to .list1.listcount
     if .list1.selected(i)
         set order to software
         seek .list1.list(i)
         if found()
           arreglo(i)=licencias.ncod_reg
         endif
     endif
   endfor

    select equipos
    *append blank
    insert into equipos(ccod_nomina, cequipo) values (.txtcodigo.value,.txtEquipo.value) 
    *replace equipos.ccod_nomina with .txtcodigo.value
    *replace equipos.cequipo with .txtEquipo.value

	select licequipos
	for i=1 to .list1.listcount
	  if !empty(arreglo(i))
	    append blank
	    insert into licequipos(ncod_reg,cequipo, software) values (arreglo(i), .txtEquipo.value, .list1.list(i))
*	    replace licequipos.ncod_reg with arreglo(i)
*	    replace licequipos.cequipo with .txtEquipo.value
*	    replace licequipos.software with .list1.list(i)
	  endif
	endfor

	.grpbotones.cmdAnterior.enabled=.t.
    .grpbotones.cmdSiguiente.enabled=.t.
    .grpbotones.cmdAdicionar.enabled=.t.
    .grpbotones.cmdModificar.enabled=.t.
    .grpbotones.cmdSalvar.enabled=.f.
    .label3.caption="Equipos del usuario:"
    .txtEquipo.visible=.f.
    .grid2.visible=.t.
    .list1.visible=.f.
    .grid3.visible=.t.
    .refresh 
ENDWITH
how can i solve this problem?
Thanks for your help.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform