Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get 2 dbf files to form a simple recordset in ADO
Message
 
To
04/06/2002 09:29:04
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00664349
Message ID:
00664425
Views:
26
Can't you have both DBF into the same folder (maybe you can copy one temporarily). This way you could use:
oConn.Open "Driver={Microsoft dBASE Driver (*.dbf)};" & _
           "DriverID=277;" & _
           "Dbq=c:\somepath;"
SELECT Col1, Col2, Col3
FROM Table1.dbf
UNION
SELECT Col1, Col2, Col3
FROM Table2.dbf
>Hi,
>
>Thank for your help but my dbf is located in different location,
>so my ODBC location is actually pointing to different location,
>will doing the following still work
>
>rs = cnn.Open .....
>
>
>>You can surely do this using the UNION operator:
>>
SELECT Col1, Col2, Col3
>>FROM Table1
>>WHERE Col1 = Criteria
>>UNION
>>SELECT Col1, Col2, Col3
>>FROM Table2
>>WHERE Col1 = Criteria
>>ORDER BY Col1, Col2
>>
>>
>>>Hi,
>>>
>>>Using VB6, is there any way to do a SQL or retrieve data
>>>from two dbf file from different location using ADO to
>>>form a single recordset which I intend it for use with
>>>Crystal Report 8.5.
>>>
>>>I had tried to use CR query designer, but it can't
>>>using ODBC Visual Foxpro driver.
>>>
>>>Is there any recommend way or refer way to do similar stuff
>>>as I want only my Crystal report (.rpt) to pull the
>>>required record automatically, without having to have individual
>>>form for each report.
>>>
>>>Please kindly advise.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform