home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / open_WinDN554542152002.psc / DelW.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-02-12  |  2.6 KB  |  81 lines

  1. VERSION 5.00
  2. Begin VB.Form DelW 
  3.    Caption         =   "Delete Whole Domain"
  4.    ClientHeight    =   3180
  5.    ClientLeft      =   60
  6.    ClientTop       =   360
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form3"
  9.    ScaleHeight     =   3180
  10.    ScaleWidth      =   4680
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.ListBox List2 
  13.       Height          =   450
  14.       Left            =   4080
  15.       TabIndex        =   4
  16.       Top             =   240
  17.       Visible         =   0   'False
  18.       Width           =   375
  19.    End
  20.    Begin VB.ListBox List1 
  21.       Height          =   450
  22.       Left            =   1920
  23.       TabIndex        =   3
  24.       Top             =   240
  25.       Width           =   1695
  26.    End
  27.    Begin VB.CommandButton Command2 
  28.       Caption         =   "CANCEL"
  29.       Height          =   375
  30.       Left            =   2640
  31.       TabIndex        =   2
  32.       Top             =   2520
  33.       Width           =   1095
  34.    End
  35.    Begin VB.CommandButton Command1 
  36.       Caption         =   "DELETE"
  37.       Height          =   375
  38.       Left            =   720
  39.       TabIndex        =   1
  40.       Top             =   2520
  41.       Width           =   1095
  42.    End
  43.    Begin VB.Label Label1 
  44.       Caption         =   "Domain Name:       (such as e-pva.com)   "
  45.       Height          =   375
  46.       Left            =   120
  47.       TabIndex        =   0
  48.       Top             =   240
  49.       Width           =   1455
  50.    End
  51. Attribute VB_Name = "DelW"
  52. Attribute VB_GlobalNameSpace = False
  53. Attribute VB_Creatable = False
  54. Attribute VB_PredeclaredId = True
  55. Attribute VB_Exposed = False
  56. Private Sub Command1_Click()
  57. If recordDNS.State > 0 Then recordDNS.Close
  58. Dim IDee As Integer
  59. If List1.ListIndex = -1 Then MsgBox "Select a Domain": Exit Sub
  60. recordDNS.Open "Drop Table [" & List2.List(List1.ListIndex) & "];", dataDNS, adOpenKeyset, adLockPessimistic, adCmdText
  61. If recordDNS.State > 0 Then recordDNS.Close
  62. recordDNS.Open "DELETE * FROM DomainList Where ID=" & List2.List(List1.ListIndex) & ";", dataDNS, adOpenKeyset, adLockPessimistic, adCmdText
  63. Unload Me
  64. End Sub
  65. Private Sub Command2_Click()
  66. Unload Me
  67. End Sub
  68. Private Sub Form_Load()
  69. If recordDNS.State > 0 Then
  70. recordDNS.Close
  71. End If
  72. recordDNS.Open "select * from DomainList;", dataDNS, adOpenKeyset, adLockPessimistic, adCmdText
  73. Do While Not recordDNS.EOF And Not recordDNS.BOF
  74. List1.AddItem recordDNS.Fields("Domain Name")
  75. List2.AddItem recordDNS.Fields("ID")
  76. recordDNS.MoveNext
  77. End Sub
  78. Private Sub List4_Click()
  79. 'ip.Text = Trim$(List3.List(List4.ListIndex))
  80. End Sub
  81.