||Re: allowing user to change or add an alias
Akshat Kapoor <firstname.lastname@example.org>
||Mon, 19 Jun 2017 17:14:20 +0530
On 19/06/2017 16:02, Charlie wrote:
> Hi Akshat,
> Thanks very much for the information. I have tried this and understand it much better now.
> I think that I may have a big problem although am not sure.
> The vast majority of my forms are oodml. However the vast majority of my programs are xdml.
> Unless I misunderstand, I don't see a way of getting this to work with my xdml programs. Am I correct?
> Thanks again!!
Since you are using both oodml and xdml I will suggest storing table
directory in a memory variable at the start of the program.
You need not ask the user to enter the path every time. It needs to
feeded in only once and store it in a small table in your programs
At the At the start of the program retrieve it and store it in a public
variable (public variables can be accessed anywhere)
my current sql statements are like
sql = 'select * from "' +mdirect+'\vatrate.dbf"'
in case of xdml you can use the following combo
mfile = mdirect+'\vatrate.dbf'
use & mfile alias your_alias_if_required
>> This approach suffers from a drawback. If you use calculated string in a
>> form every time you open the form in designer the query
>> sql = 'select * from "' +mdirect+'\vatrate.dbf"'
>> is replaced by
>> sql = 'select * from "C:\dbasetutorial\muneem\1\vatrate.dbf"'
>> To avoid this situation you will have to use the Form_onOpen event to
>> redeclare the query and requery.
If you still have any problem I am here to help.