Espero puedan ayudarme
Código:
Try
Dim da As New FbDataAdapter("SELECT COMPQ" & bdempresa & ".CVE_DOC, COMPQ" & bdempresa & ".FECHA_DOC, COMPQ" & bdempresa & ".SU_REFER, COMPQ_CLIB" & bdempresa & ".CAMPLIB2 FROM (COMPQ" & bdempresa & " INNER JOIN COMPQ_CLIB" & bdempresa & " ON COMPQ" & bdempresa & ".CVE_DOC = COMPQ_CLIB" & bdempresa & ".CLAVE_DOC) WHERE COMPQ_CLIB" & bdempresa & ".CAMPLIB2 IS NULL", conexion)
Dim dt As New DataTable ' crear un DataTable
da.Fill(dt)
Dim da2 As New FbDataAdapter("Select CLAVE, NOMBRE FROM REQ" & bdempresa, conexion2)
Dim dt2 As New DataTable ' crear un DataTable
da2.Fill(dt2)
DataGridView1.DataSource = (From requisiciones As DataRow In dt
Join requisidores As DataRow In dt2
On requisiciones.Field(Of String)("SU_REFER") Equals requisidores.Field(Of String)("CLAVE")
Select New With {.doc = requisiciones.Field(Of String)("CVE_DOC"), .Fecha = requisiciones.Field(Of Date)("FECHA_DOC").ToString, .solicita = requisidores.Field(Of String)("NOMBRE")}).ToList
Catch ex As Exception
MsgBox(ex.Message.ToString)
End Try


