Does the VFP ODBC driver support subdirectories?

I received a question from a customer:


I don't know how to search for this but does ODBC, specfically Visual FoxPro support opening tables in a subdirectory?


ODBC is very old.. OLEDb is much more recent.


In any case, the answer is yes, the ODBC driver supports opening files in subdirectories.


If you want to access data on other paths, one way is to make another connection.




h=SQLSTRINGCONNECT("Driver=Microsoft Visual Foxpro Driver;SourceType=dbf;SourceDB="+cPath)


IF h>0

      ?SQLEXEC(h,"Select * from customer") && retrieve customer table

      MD (cPath+"\Subdir")    && Make a subdir

      SELECT DISTINCT city FROM customer INTO TABLE (cPath+"Subdir\cities")

      USE IN cities     && close the cities table

      ?SQLEXEC(h,"Select * from "+cPath+"\Subdir\cities")

      LIST next 10


SQLDISCONNECT(0)  && Disconnect all



Comments (6)

  1. John Koziol says:

    Talk to Richard; he and I were really serious about specing out an updated form of Logo for .Net a few years ago and he has some great ideas on the subject.  Man, it’d be great to have a kid-level .Net language out there.

  2. Sanjay says:

    I have been working with ODBC for quite some time. I have tried to use VFPOLEDB from CRYSTAL REPORTS 9.2 and 8.5 versions but as soon as i select VFPOLEDB from the CRYSTAL REPORTS the next page for database selection is blank and than FINISH. Sometimes CRYSTAL REPORTS just shuts down without any warning… i dont know how to get the VFPOLEDB work for me.

    I put up this question on UT and CRAIG B. replied to it and he pointed me to have a look at his web pages on CRSYTAL REPORTS which he hasnt updated for years and i just cant get it working for me.

    I would appreciate if you could show me how to programmatically create a VFPOLEDB and use it with my CRYSTAL REPORTS. Mind that my REPORTS were created with ODBC and now i have to change these reports to VFPOLEDB.

    Any help or suggestions will be highly appreciated.



  3. olesja says:

    <a href= >easy to make peanut butter cookies</a>

  4. olesja says:

    <a href= >easy to make peanut butter cookies</a>

  5. matar_jr says:

    <a href= >orange barrel media</a> <a href= >driving directions to south shore animal hospital in ma</a> <a href= >wonder woman posters</a> <a href= >aws engineering rules</a> <a href= >why does my dvd now say wrong disc or no disc in dvd player</a>

Skip to main content