Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding Records and Deleting Records in a Table
Message
De
09/07/2003 08:28:12
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00808371
Message ID:
00808426
Vues:
15
>I have a small program which when you run it adds the Local IP Address of the machine. A message box pops up and states the IP address has been added. What I would like to do when I
>click on the OK button on the Message Box I would like it to delete the IP address from the same table. Can anybody help me, here is my code:
>
>
>oIPSocket = CreateObject("MSWinsock.Winsock")
>
>USE "U:\IPAddresses\IPaddresses.dbf"
>
>INSERT INTO ipaddresses (ipaddress) ;
>VALUES (oIPSocket.LocalIP)
>MESSAGEBOX("IP Address has been added to Table")
>
>QUIT
>
>Many Thanks
Select ipaddress from ipaddresses into cursor tempip where ipaddress = oIPSocket.LocalIP
If RecNo('tempid') = 0
  INSERT INTO ipaddresses (ipaddress) ;
  VALUES  (oIPSocket.LocalIP)
  MESSAGEBOX("IP Address has been added to Table")
Else
  MessageBox("IP Address already in table")
Endif
Use in 'tempid'
Alan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform