Dim dr As DataRow = DataTables("客户联系人").SQLFind("QQ号码 like 122828837")
If dr IsNot Nothing Then
Dim pr As DataRow = dr.GetParentRow("客户信息")
MessageBox.show(pr("公司简称"))
Else
MessageBox.show("nothing")
End If
客户信息是父表,客户联系人是子表,两者通过“客户ID”,已经做了关联
报出来错误【未将对象引用设置到实例】
为什么上面的SQLfind查找出来dr的不能用
而用Dim dr As DataRow = DataTables("客户联系人").datarows(0)却可以使用