Subject Re: exe problem
From Charlie <tm@tc.com>
Date Fri, 09 Oct 2020 17:20:13 -0400
Newsgroups dbase.getting-started

OK So since it is throughout the entire program I took someone's advice and did this on the first line.  set directory to c:\dbasewin\golf  Seems to fix it but doesn't give an explanation.  Thanks for the help!

Charlie Wrote:

> The program shows windows\system32 from absolute start to finish on the new computer.  I'm wondering if it is a windows issue.
>
> Andy Taylor Wrote:
>
> > Charlie,
> >
> > Clearly, there is code in your exe that changes the working folder as far as dBASE is concerned.
> > What I suggest you do is insert the msgbox code at various points in the application to narrow down where the offending code is then come back to us if the cause is not obvious.
> >
> > Good luck,
> > Andy
> >
> > > OK I uised the msgbox that was suggested and yes it came up with windows\system32\   I really don't understand as it has always worked fine on my old  computer.  There is no reference to the system32 directory anywhere.  I deleted everything and ran the project again and built a new exe file.  Does the same thing.  I have another dbase program on the same new computer and it tests in the correct directory.  I am baffled!!
> > >
> > > Mervyn Bick Wrote:
> > >
> > > > On 2020/10/04 19:01, Charlie wrote:
> > > > > I’m running windows 10 on a new computer.  I installed 1130b2550 and 1130runtime-b2550.  My old computer ran these perfectly.
> > > > >
> > > > > Actually this program runs great in dbase.  However when I run the exe file that was built in project explorer I have run into a couple unexpected errors.
> > > > >
> > > > > I get this one when I run a particular report, other reports run fine…
> > > > >
> > > > > Database Engine Error:  Permission denied:  C:\windows\system32\_QSQL000.DBF
> > > > >
> > > > > The following script is where the error is pointing…..
> > > > >
> > > > >    database = form.form.database1
> > > > >        sql = "select i.*,c.*from golfers_scores i inner join dbname c on i.dbname = c.dbname order by i.lname,i.fname"
> > > > >        requestLive = false
> > > > >        active = true
> > > > >
> > > > > The other error is…
> > > > >
> > > > > Error:  Access denied:  tempworkfile.txt
> > > > >
> > > > > It seems to be some-sort of a permission problem having to do with a temp dbf file that is deleted at the end of the script.
> > > > >
> > > > > Appreciate any help or suggestions.
> > > > >
> > > >
> > > > Whenever you use an ORDER BY clause in a select statement dBASE creates
> > > > a temporary file named _QSQLnnn.DBF  This file is usually in the same
> > > > folder as the program.
> > > >
> > > > I have no idea why your report is trying place the temporary file in
> > > > C:\windows\system32 but Windows 10 regards this as a definite no-no.
> > > >
> > > > Do any of the other reports that do run include an ORDER BY  clause?
> > > >
> > > > Where do you place tempworkfile.txt?
> > > >
> > > > Mervyn.
> > > >
> > > >
> > > >
> > >
> >
>