Dim cmd As New SQLCommand Dim dt
As
DataTable
Dim dr As
DataRow = e.DataRow cmd.ConnectionName =
"行政区域" cmd.CommandText = "SELECT * From {行政区域} Where [省市] = '" &
dr("省市") &
"' And [县市] = '" &
dr("县市") &
"'"
dt = cmd.ExecuteReader
If dt.DataRows.Count > 0
Then dr("区号") =
dt.DataRows(0)("区号") dr("邮编") = dt.DataRows(0)("邮编") Else dr("区号") =
Nothing dr("邮编") = Nothing
End
If