General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>Help!
>I have a VFP program that needs to read in an Access database in a CD-ROM.
>The CD-ROM will be changed each month, for example: Jan99.mdb, Feb99.mdb, Mar99.mdb
>I have created a project with a remote view named "FRONTIER" to point to the Access database.
>When I run the VFP program to open the view using the command: USE FRONTIER, a window pops up asking me to select the name of the Access database file.
>Is there a way I can program VFP so that I don't have to select the Access database file when I use the VIEW command. Fox example:
>USE VIEW in M:\JAN99.MDB <= I know this does not work! M: is the CD-ROM drive
>
>Thanks in advance
You may be able to do this with a sql-passtrough call that uses a DSN-less connection. The problem with the remote views is how to specify a different source each time. If you copy and paste the SQL source in your remote view to a string and execute it with SQLExec against the new month's MDB, then that may work for you. i.e., cThisMonth=LEFT(CMONTH(DATE()),3) and put that in your SQLStringConnect call. HTH
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only