|
Answer» Hi Everyone,
I have tried my best to search for this problem I'm sure I'm not the only out there with this problem but i just dint seem to have any luck.
I have a certain access database originally 2003 that when run from the cmd line PRODUCES a graphical windows error "file not found" that halts the batch file. This error is graphical and I cannot suppress it from the cmd line. The file is there and runs... Access LOADS up does its stuff and its only on the exit of access that the error occurs. This does not happen when double clicking the file through explorer.
I have done the following with no success
Converting to 2007 database Renaming files to no spaces Running with quotes around file names Piping cmd output to file with > Changing Directory Renaming Directory for no spaces Disabling compact on close Using quit with SaveAll and Exit CTTY nul - (this is not a recognised cmd on my system) Settings permissions for Everyone full access rights preceding the opening of the file with start
Below is the batch file. The error occurs for each file but they are copies of each other except for minor alterations.
Code: [Select]cd C:\TextAnywhere LutonAuto.accdb BedfordAuto.accdb RushdenAuto.accdb cd dist java -jar "Text Anywhere.jar" pause I am running on Windows 2003 server as Administrator with Office 2007. All updates patches installed inc the latest office service pack. The access databases do some sql querying and output results as csv. I made a java app to read these csv files, connect to a txt gateway and send customers appointment reminders. The file not found error is stopping this being automated.
Any feedback or suggestions would be much welcomed!
Cheers Tim- BUMP
Have also tried coding a wait for ten seconds between writing the file and the database closing. No luck though Weirdly if i have a message box between them no errors occur, this is no good though as i need it automated!Screen print -
[recovering disk space - old attachment deleted by admin]The csv file is definitely written by the macro before it closes. I put a 30second wait after writing and checked the RESULT then. Just tried it on another machine and same thing, also tried disabling the virus scanner. The only thing i can think of is the database is SOMEHOW corrupt (unlikley) or that the command im using to quit is not correct.
VBA quitting -
Code: [Select]Application.QuitMacro quitting -
Code: [Select]Quit with options exit and saveall tried
Though i though the above where pretty standard and I have used them before with no problems at all. Do they look correct to everyone?
Cheers
TimHave you considered exporting it (dumping it to a sql file) then importing it into mySQL to see if you have better luck at the command PROMPT. I have had better luck personally from mySQL when running processes at console mode and through batched and scripted methods. I am using mySQL 5.1 and havent had any problems with batches and automated processes that are in a feedback loop of reads and writes etc. *There is a checkbox during the mySQL installation that enables console command line interfacing with mySQL. I think mySQL will solve your issue possibly.
|