> Dim s_conn As String > Dim cn As ADODB.Connection > Dim rs As ADODB.Recordset > Set cn = New ADODB.Connection > Set rs = New ADODB.Recordset > strSQL = "select * from c:\nr_instl.dbf inner join c:\nr_headr.dbf on nr_headr.HD_ID_NUM = nr_instl.IN_ID_NUM where IN_AMOUNT = 0" > s_conn = "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=" <-- What goes here cn.Open s_conn > rs.Open strSQL, cn >The problem was that there was not a connection to EACH of the tables. The following code works great: Apparently ADO doesn't like to 'fudge' the second connection even though its a single SQL it still demands an active connection to all parties involved. An interesting point is that the open can use 1 connection ...
Dim s_conn As String, s_conn1 As String Dim cn As ADODB.Connection Dim cn1 As ADODB.Connection Dim rs As ADODB.Recordset Set cn = New ADODB.Connection Set cn1 = New ADODB.Connection Set rs = New ADODB.Recordset s_conn = "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=c:\nr_instl.dbf" s_conn1 = "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=c:\nr_headr.dbf" cn.Open s_conn cn1.Open s_conn1 strSQL = "select * from c:\nr_instl.dbf inner join c:\nr_headr.dbf on nr_headr.HD_ID_NUM = nr_instl.IN_ID_NUM where IN_AMOUNT = 0" rs.Open strSQL, cn
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams