charlotte49er
Programmer
I'm trying to join 2 txt files using ado. I've seen a couple of obscure examples but I can't seem to get them to work. Can someone please provide some suggestions or correct my code below? Thanks in advance.
Code:
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPathtoTextFile & ";" & _
"Extended Properties=""text;HDR=YES;FMT=Delimited"""
Dim strQuery
strQuery = "SELECT rvf_elevation.NAME FROM ([rvf_newformat#txt]rvf_newformat,[rvf_elevation#txt]rvf_elevation WHERE rvf_newformat.SITECODE = rvf_elevation.SITECODE)"
oRs.Open strQuery, oConn, adOpenStatic, adLockOptimistic, adCmdText