>>Hi Michelle,
>>There are more than one ways to accomplish this. But I think SQL "create table" is the easiest. For an example run gendbc (do home()+"tools\gendbc\gendbc") with one of your databases. Check the code created.
>>Also check these :
>>-Create table
>>-Copy to
>>-Alter table
>>-Drop table
>>-Delete tag
>>etc
>>BTW you could also use "modify structure" on runtime if have exclusive access.
>>Cetin
>
>I've been playing around since I made my post, and I found that "modify structure" command. When I work from the command window in VFP, that brings up the form I need to mess around with the structure. If I call a command window from my app, and do a m.s., will that bring up that same form, even if the computer the app is running on doesn't have VFP?
>
>If so, that's exactly what I need.
>
>How do I get the command window from my app, anyway?
>
>Thanks,
"Modify structure" can be used from an exe (although I prefer SQL series).
I don't know how to get a command window, there are utilities doing it somewhere but don't remember.
But there is another way (more than one in fact) :
- You could put modify structure etc on a separate exe and run it on access.
- You could have an evaluator routine in your exe. I mean you could write some commands in an edit window and execute them by & or eval(). This would have some problem that every command you used there should be existed in your app or error occurs (you could use clauses rather than commands though ie: Label "select" just get the rest of select in edit and execute "select &myeditboxcontents").
- You could have a form with commands that would be used in process and editboxes, optiongroups, listboxes to build the syntax and execute (something like above).
- Finally maybe the easiest for a remote control, you could have something like this in your app:
m.commandfile = getfile()
if !empty(m.commandfile)
do (m.commandfile)
endif
So instead of having command window on remote, you write code in local, compile as fxp or app, upload and call this via remote control.
Cetin