楼主,你下次上传的时候,只需要上传少量测试数据就行了。
用下面的代码替换原来的,就可以了。
If e.DataRow.IsNull("联系电话") Then
If e.DataRow.IsNull("办公电话") Then
e.DataRow("号码归属地") = Nothing
Else
If e.NewValue IsNot Nothing AndAlso e.NewValue.Length >= 3 Then
Dim qh1 As String = e.NewValue.SubString(0,4)
Dim qh2 As String = e.newvalue.Substring(0,3)
Dim phone As DataRow = DataTables("手机号码归属地").Find("区号 = '" & qh1 & "' Or 区号 = '" & qh2 & "'")
If phone IsNot Nothing Then
e.DataRow("号码归属地") = phone("地区") & " " & phone("卡类别")
End If
End If
End If
Else
If e.NewValue IsNot Nothing AndAlso e.NewValue.length >= 7 Then
Dim tele As String = e.NewValue.SubString(0,7)
Dim phone As DataRow = DataTables("手机号码归属地").Find("手机编码 = '" & tele & "'")
If phone IsNot Nothing Then
e.DataRow("号码归属地") = phone("地区") & " " & phone("卡类别")
End If
End If
End If
[此贴子已经被作者于2013-1-25 11:29:59编辑过]