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 / AddA.frm (.txt) next >
Encoding:
Visual Basic Form  |  2002-02-12  |  3.5 KB  |  115 lines

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