Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a better way to do this?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Is there a better way to do this?
Miscellaneous
Thread ID:
00162439
Message ID:
00162439
Views:
42
I get a DB/table name to open from another DB/table full of DB/table names.

Code looks something like this:

dbnam = mydb.dbnames && Get DB name from list of DB names
SELECT &dbnam && Select DB/table that came from list
SEEKID = &dbnam.field1 && Get Seek ID value
SEEK SEEKID && Seek the record
IF FOUND()
.....
.....
ENDIF

But whenever I run the program and it encounters the SEEKID =
&dbnam.field1 command, I get an error that &dbnam is not an object. I thought I had used a Macro substitution in the past just like this without error. Any ideas? Is there a better way to do it?

I have read that one may use SELECT (dbnam) instead, but I get the same error, but better performance? Thanks.
Steve Kramer
Kramer & Kramer Design
"Home of Go Cartoons"
Web Site: www.stephenkramer.com
Would you believe Far Side Lite?
More than 270 original cartoons.
Next
Reply
Map
View

Click here to load this message in the networking platform