Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!aurora!labrea!decwrl!sun!imagen!atari!portal!cup.portal.com!BOB_PROF_LAKE From: BOB_PROF_LAKE@cup.portal.com Newsgroups: comp.databases Subject: Re: dBASE III+ problem Message-ID: <1348@cup.portal.com> Date: Sat, 7-Nov-87 23:46:54 EST Article-I.D.: cup.1348 Posted: Sat Nov 7 23:46:54 1987 Date-Received: Wed, 11-Nov-87 01:23:25 EST References: <1037@cup.portal.com> <190@brl-tbd.ARPA> Organization: The Portal System (TM) Lines: 38 XPortal-User-Id: 1.1001.2418 In message 190@brl-tbd.ARPA, Cliff B. Sothoron posts: > >I would like to prompt a user in a .prg file with a sequence similar to >this: > >datab='test.dbf' >@ 2,2 say 'What database do you wish to access' get datab >read >use 'datab' > >The sequence above does not work. The file test.dbf is assumed to exist. >If it does not I know that I can always use the FILE() command mentioned >in volume 2 of the dBASE manual. Does anyone know what I have to do to >get dBASE to use a database name input via a memory variable? I think what you need here is a macro. You really want to substitute the contents of the variable 'datab' for the name of the file. Instead of: use 'datab' try: use &datab This has worked for me (you may have to fiddle a little with the extension, etc.) =============================================================================== | Robert C. Lake | VOICE: (205) 271-9581 (Work) | | School of Business | VOICE: (205) 279-8185 (Home) | | Auburn University at Montgomery | CIS: [71216,560] | | Montgomery, AL 36116 | "Viva la papillon Venus!" | |-----------------------------------------------------------------------------| | rcl@cup.portal.com | | {ucbvax,decwrl,decvax,seismo,hplabs}!sun!portal!cup.portal.com!rcl | =============================================================================== | Opinions expressed above are solely my own -- not my employer's | ===============================================================================