Mike's response is correct if you are accessing Foxpro tables with your SQL. For Foxpro, whether or not the tables are defined within a database container does not affect how you open them, except that you can specify a database container name in your USE statement, thus:
USE mydatabase!mytable shared
Also, remember that Foxpro (up through version 7 anyway) does not support all the SQL syntax that Client-Server databases like SQL Server or Oracle do - it only supports a sub-set of the standard SQL. Foxpro could return a syntax error if you use a syntax it doesn't support.
If you are accessing SQL Server or Oracle, you're probably going to do it through ODBC using SQLCONNECT() and SQLDISCONNECT() to connect, SQLEXEC() to run SQL against the database, and AERROR() to check for errors. To do this, you need an ODBC entry, which you create by from the Windows Control Panel.
Hope this helps. Mike Krausnick