Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamic database names

Status
Not open for further replies.

paryl

IS-IT--Management
Jul 24, 2001
12
0
0
US
I have a project that I'm not sure can be done. Hope someone has some input...

I have a file that holds a list of file names. Each name relates to a separate dbf. I normally connect to my data using the VFP ODBC driver. In this case though, I need to read the parameters file to determine what dbf to connect to.

I've gone round and round through CR and SQL designer, but can't find a way to do it. The closest I've come is the following in SQL designer:

select substr (DATA1,10,5)
from parameters
where DATA1 = "LGA 1"

That returns a file name. Either SQL designer or the VFP driver doesn't seem to like a typical SQL subquery though, so I'm lost.

Is there *any* way to do what I need to do? The links will always be the same, the file names just happen to change. Please help(!) if possible.


Thanks,
-phillip

 
Is it the case that the report is set up to work against tables in one of the '.dbf' database files ?
I have a number of reports set-up to work against tables in a SQL Server database. At start of the application (written in Delphi 5) the user is able to select a SQL Server database and then the reports point to the tables within this database.
This is done by re-setting the location of the tables within the report initialisation (using the syntax "CRReport.Database.Tables[x].Location :- 'DatabaseName.dbo.Table-Name'".
Hope this is of some help
Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top