Subject Re: allowing user to change or add an alias
From Charlie <cpsiegel@gmail.com>
Date Sat, 17 Jun 2017 14:45:25 -0400
Newsgroups dbase.getting-started

Hi Akshat..

Thanks, I have looked at yours but don't get exactly what you are doing.  Could you send the tables?  Or the structure?  Possibly that would help me understand it.  If I can fix the permissions or whatever is causing the problem bdealias.cc will work well.  But I still love learning other ways of doing things.  And that's a good thing because I have a whole lot to learn!!! :)

Akshat Kapoor Wrote:

> On 17/06/2017 06:10, Charlie wrote:
> > Hey.. Thanks very much.  I will study this!!
> >
> Hello Charlie,
> After seeing all this discussion I am glad I am not using this.
> Well every one has a liking for his/her own methods.
> And I learn't mine the hard way of trial and error without the aid of
> newsgroup like these, So even more attached to these. :-)
>
> But there are certain aspects of the advise I received and skipped at
> that time are being followed now.
>
> Keep trying till you find the method most suited for you.
> Regards
> Akshat
>
> > Akshat Kapoor Wrote:
> >
> >> On 16/06/2017 04:16, Charlie wrote:
> >>> Hi... I have been fooling with bdealiasEX.cc and am trying to allow the user of my software to change the path to the database.  I have set the procedure to bdealiasex.cc (on open)  in a form I am using that has an entryfield defining the path that the user wants to use.  I am having trouble understanding how this works.  Could someone give me some guidance?
> >>>
> >>> Thanks!!
> >>>
> >> Hello Charlie,
> >> I have not used bdealiasEX.cc
> >> But I had at one time experimented with adding temprory alias.
> >> I have not implemented it but did check it out.
> >>
> >> The attached prg works fine. for testing just change the folder paths
> >> and table names to the ones you have on your computer. If you have any
> >> problem I can even send the tables to you.
> >>
> >> The approach I use to avoid hard coding of database paths is slightly
> >> different.
> >> At the start of the program I declare a object and store the path of
> >> database (this path is stored in a table in the program directory)as a
> >> property of the object. Then in the datamodule I use this property as
> >> part of the sql
> >>
> >> class inveDATAMODULE of DATAMODULE
> >>     this.VATRATE = new QUERY(this)
> >>     with (this.VATRATE)
> >>        left = 138.0
> >>        top = 19.0
> >>        sql = 'select recno,tax,vat,sat from "' +
> >> mcompany.direct+'\vatrate.dbf"'
> >>        active = true
> >>     endwith
> >>
> >> Hence I do not need database alias. Moreover path can be changed at will.
> >> This can be achieved in the form also but the form designer evaluates
> >> the expression and replaces the sql string with the evaluated string.
> >>
> >> So I use datamodules which are seldom opened.
> >>
> >> Regards
> >> Akshat
> >>
> >
>