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 / EditA.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2002-02-12  |  4.1 KB  |  133 lines

  1. VERSION 5.00
  2. Begin VB.Form EditA 
  3.    Caption         =   "Edit A-Record/ Sub-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 List4 
  13.       Height          =   450
  14.       Left            =   1920
  15.       TabIndex        =   9
  16.       Top             =   960
  17.       Width           =   1695
  18.    End
  19.    Begin VB.ListBox List3 
  20.       Height          =   450
  21.       Left            =   4080
  22.       TabIndex        =   8
  23.       Top             =   960
  24.       Visible         =   0   'False
  25.       Width           =   375
  26.    End
  27.    Begin VB.ListBox List2 
  28.       Height          =   450
  29.       Left            =   4080
  30.       TabIndex        =   7
  31.       Top             =   240
  32.       Visible         =   0   'False
  33.       Width           =   375
  34.    End
  35.    Begin VB.ListBox List1 
  36.       Height          =   450
  37.       Left            =   1920
  38.       TabIndex        =   6
  39.       Top             =   240
  40.       Width           =   1695
  41.    End
  42.    Begin VB.CommandButton Command2 
  43.       Caption         =   "CANCEL"
  44.       Height          =   375
  45.       Left            =   2640
  46.       TabIndex        =   5
  47.       Top             =   2520
  48.       Width           =   1095
  49.    End
  50.    Begin VB.CommandButton Command1 
  51.       Caption         =   "OK"
  52.       Height          =   375
  53.       Left            =   720
  54.       TabIndex        =   4
  55.       Top             =   2520
  56.       Width           =   1095
  57.    End
  58.    Begin VB.TextBox ip 
  59.       Height          =   375
  60.       Left            =   1800
  61.       TabIndex        =   3
  62.       Top             =   1680
  63.       Width           =   2055
  64.    End
  65.    Begin VB.Label Label3 
  66.       Caption         =   "IP Address of Sub Domain: "
  67.       Height          =   495
  68.       Left            =   120
  69.       TabIndex        =   2
  70.       Top             =   1680
  71.       Width           =   1455
  72.    End
  73.    Begin VB.Label Label2 
  74.       Caption         =   "Full Domain:       (such as ww.you.e-pva.com)   "
  75.       Height          =   615
  76.       Left            =   120
  77.       TabIndex        =   1
  78.       Top             =   840
  79.       Width           =   1455
  80.    End
  81.    Begin VB.Label Label1 
  82.       Caption         =   "Domain Name:       (such as e-pva.com)   "
  83.       Height          =   375
  84.       Left            =   120
  85.       TabIndex        =   0
  86.       Top             =   240
  87.       Width           =   1455
  88.    End
  89. Attribute VB_Name = "EditA"
  90. Attribute VB_GlobalNameSpace = False
  91. Attribute VB_Creatable = False
  92. Attribute VB_PredeclaredId = True
  93. Attribute VB_Exposed = False
  94. Private Sub Command1_Click()
  95. If recordDNS.State > 0 Then recordDNS.Close
  96. 'On Error Resume Next
  97. Dim IDee As Integer
  98. If List4.ListIndex = -1 Then MsgBox "Please select a sub domain": Exit Sub
  99. If List1.ListIndex = -1 Then MsgBox "Select a Domain": Exit Sub
  100. If ip.Text = "" Then MsgBox "IP of Domain is Blank": Exit Sub
  101. recordDNS.Open "select * from " & List2.List(List1.ListIndex) & " WHERE type <> 15 AND Name='" & List4.List(List4.ListIndex) & "';", dataDNS, adOpenKeyset, adLockPessimistic, adCmdText
  102. recordDNS("IP") = ip.Text
  103. recordDNS.Update
  104. recordDNS.Close
  105. Unload Me
  106. End Sub
  107. Private Sub Command2_Click()
  108. Unload Me
  109. End Sub
  110. Private Sub Form_Load()
  111. If recordDNS.State > 0 Then
  112. recordDNS.Close
  113. End If
  114. recordDNS.Open "select * from DomainList;", dataDNS, adOpenKeyset, adLockPessimistic, adCmdText
  115. Do While Not recordDNS.EOF And Not recordDNS.BOF
  116. List1.AddItem recordDNS.Fields("Domain Name")
  117. List2.AddItem recordDNS.Fields("ID")
  118. recordDNS.MoveNext
  119. End Sub
  120. Private Sub List1_Click()
  121. If recordDNS.State > 0 Then
  122. recordDNS.Close
  123. End If
  124. recordDNS.Open "select * from " & List2.List(List1.ListIndex) & " WHERE type <> 15;", dataDNS, adOpenKeyset, adLockPessimistic, adCmdText
  125. Do While Not recordDNS.EOF And Not recordDNS.BOF
  126. List4.AddItem recordDNS.Fields("Name")
  127. List3.AddItem recordDNS.Fields("IP")
  128. recordDNS.MoveNext
  129. End Sub
  130. Private Sub List4_Click()
  131. ip.Text = Trim$(List3.List(List4.ListIndex))
  132. End Sub
  133.